Commit 08ea43e5 authored by Kostas Papadimitriou's avatar Kostas Papadimitriou
Browse files

Fix default cyclades ui UI_MEDIA_URL setting

parent 7820cc3f
......@@ -12,6 +12,6 @@ synnefo_web_middleware = []
synnefo_web_context_processors = ['synnefo.lib.context_processors.cloudbar']
synnefo_static_files = {
'synnefo.ui': 'ui',
'synnefo.ui': 'ui/static',
'synnefo.admin': 'admin',
}
......@@ -10,7 +10,7 @@ COMPUTE_API_URL = '/api/v1.1'
# base url for ui static files
# if not set, defaults to MEDIA_URL + 'snf-<latest_ui_version>/'
UI_MEDIA_URL = '/static/ui/snf/'
UI_MEDIA_URL = '/static/ui/static/snf/'
# UI requests to the API layer time out after that many milliseconds
TIMEOUT = 10 * 1000
......
......@@ -66,14 +66,16 @@ if getattr(settings, 'WEBPROJECT_SERVE_STATIC', settings.DEBUG):
{'document_root': static_root,
'show_indexes': getattr(settings,
'WEBPROJECT_STATIC_SHOW_INDEXES', True)}))
else:
# app contains static files in <appname>/static/<appname>
for fpath in os.listdir(static_root):
urlns = ns + fpath
urlpatterns += patterns('', url(r'^%s%s/(?P<path>.*)$' % \
(settings.MEDIA_URL.lstrip("/"), urlns),
url_r = r'^%s%s/(?P<path>.*)$' % (settings.MEDIA_URL.lstrip("/"), urlns)
static_root = os.path.join(static_root, urlns)
urlpatterns += patterns('', url(url_r,
'django.views.static.serve',
{'document_root': os.path.join(static_root, urlns),
{'document_root': static_root,
'show_indexes': getattr(settings,
'WEBPROJECT_STATIC_SHOW_INDEXES', True)}))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment