]> git.0d.be Git - wcs-on-openshift.git/blobdiff - wsgi.py
serve some static files using WhiteNoise
[wcs-on-openshift.git] / wsgi.py
diff --git a/wsgi.py b/wsgi.py
index 52e52295b5d28c2726a053653cce1f2ffe10f7c0..9dc3bae672d73f56358fbb084bc22e14d1321592 100644 (file)
--- a/wsgi.py
+++ b/wsgi.py
@@ -14,6 +14,8 @@ if 'OPENSHIFT_PYTHON_DIR' in os.environ:
 # line, it's possible required libraries won't be in your searchable path
 #
 
+from whitenoise import WhiteNoise
+
 BASE_WCS_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'wcs')
 sys.path.append(BASE_WCS_DIR)
 if os.path.exists(os.path.join(BASE_WCS_DIR, 'data/vendor/effective_tld_names.dat')):
@@ -49,8 +51,8 @@ publisher.WcsPublisher.APP_DIR = os.environ.get('OPENSHIFT_DATA_DIR', '/tmp/')
 publisher.WcsPublisher.DATA_DIR = os.path.join(BASE_WCS_DIR, 'data')
 pub = publisher.WcsPublisher.create_publisher(register_cron=False)
 
-application = QWIP(pub)
-
+application = WhiteNoise(QWIP(pub))
+application.add_files(os.path.join(BASE_WCS_DIR, 'wcs/qommon/static'), 'qo')
 
 if __name__ == '__main__':
     from wsgiref.simple_server import make_server