climate-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jo...@apache.org
Subject svn commit: r1570781 - /incubator/climate/trunk/ocw-ui/backend/run_webservices.py
Date Sat, 22 Feb 2014 02:44:50 GMT
Author: joyce
Date: Sat Feb 22 02:44:50 2014
New Revision: 1570781

URL: http://svn.apache.org/r1570781
Log:
CLIMATE-332 - Add static file serve endpoints

Modified:
    incubator/climate/trunk/ocw-ui/backend/run_webservices.py

Modified: incubator/climate/trunk/ocw-ui/backend/run_webservices.py
URL: http://svn.apache.org/viewvc/incubator/climate/trunk/ocw-ui/backend/run_webservices.py?rev=1570781&r1=1570780&r2=1570781&view=diff
==============================================================================
--- incubator/climate/trunk/ocw-ui/backend/run_webservices.py (original)
+++ incubator/climate/trunk/ocw-ui/backend/run_webservices.py Sat Feb 22 02:44:50 2014
@@ -27,15 +27,36 @@ app.mount('/dir/', dir_app)
 app.mount('/rcmed/', rcmed_app)
 
 @app.route('/')
+@app.route('/index.html')
 def index():
-    return "OCW Backend is running!"
+    raise static_file('index.html', root='./app')
+
+@app.route('/js/:path#.+#')
+def server_static(path):
+    return static_file(path, root='./app/js/')
+
+@app.route('/css/:path#.+#')
+def server_static(path):
+    return static_file(path, root='./app/css/')
+
+@app.route('/img/:path#.+#')
+def server_static(path):
+    return static_file(path, root='./app/img/')
+
+@app.route('/partials/:path#.+#')
+def server_static(path):
+    return static_file(path, root='./app/partials/')
+
+@app.route('/font/:path#.+#')
+def server_static(path):
+    return static_file(path, root='./app/font/')
 
 @app.route('/static/eval_results/<file_path:path>')
 def get_eval_result_image(file_path):
     ''' Return static file.
     
     Return static file specified by root + filepath where root defaults to:
-        /tmp/rcmet
+        /tmp/ocw
 
     The 'root' path should coincide with the work directory set used by the
     OCW toolkit for processing.



Mime
View raw message