Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
synnefo
Commits
08ea43e5
Commit
08ea43e5
authored
Jul 16, 2012
by
Kostas Papadimitriou
Browse files
Fix default cyclades ui UI_MEDIA_URL setting
parent
7820cc3f
Changes
3
Hide whitespace changes
Inline
Side-by-side
snf-cyclades-app/synnefo/app_settings/__init__.py
View file @
08ea43e5
...
@@ -12,6 +12,6 @@ synnefo_web_middleware = []
...
@@ -12,6 +12,6 @@ synnefo_web_middleware = []
synnefo_web_context_processors
=
[
'synnefo.lib.context_processors.cloudbar'
]
synnefo_web_context_processors
=
[
'synnefo.lib.context_processors.cloudbar'
]
synnefo_static_files
=
{
synnefo_static_files
=
{
'synnefo.ui'
:
'ui'
,
'synnefo.ui'
:
'ui
/static
'
,
'synnefo.admin'
:
'admin'
,
'synnefo.admin'
:
'admin'
,
}
}
snf-cyclades-app/synnefo/app_settings/default/ui.py
View file @
08ea43e5
...
@@ -10,7 +10,7 @@ COMPUTE_API_URL = '/api/v1.1'
...
@@ -10,7 +10,7 @@ COMPUTE_API_URL = '/api/v1.1'
# base url for ui static files
# base url for ui static files
# if not set, defaults to MEDIA_URL + 'snf-<latest_ui_version>/'
# 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
# UI requests to the API layer time out after that many milliseconds
TIMEOUT
=
10
*
1000
TIMEOUT
=
10
*
1000
...
...
snf-webproject/synnefo/webproject/urls.py
View file @
08ea43e5
...
@@ -66,14 +66,16 @@ if getattr(settings, 'WEBPROJECT_SERVE_STATIC', settings.DEBUG):
...
@@ -66,14 +66,16 @@ if getattr(settings, 'WEBPROJECT_SERVE_STATIC', settings.DEBUG):
{
'document_root'
:
static_root
,
{
'document_root'
:
static_root
,
'show_indexes'
:
getattr
(
settings
,
'show_indexes'
:
getattr
(
settings
,
'WEBPROJECT_STATIC_SHOW_INDEXES'
,
True
)}))
'WEBPROJECT_STATIC_SHOW_INDEXES'
,
True
)}))
else
:
else
:
# app contains static files in <appname>/static/<appname>
# app contains static files in <appname>/static/<appname>
for
fpath
in
os
.
listdir
(
static_root
):
for
fpath
in
os
.
listdir
(
static_root
):
urlns
=
ns
+
fpath
urlns
=
ns
+
fpath
urlpatterns
+=
patterns
(
''
,
url
(
r
'^%s%s/(?P<path>.*)$'
%
\
url_r
=
r
'^%s%s/(?P<path>.*)$'
%
(
settings
.
MEDIA_URL
.
lstrip
(
"/"
),
urlns
)
(
settings
.
MEDIA_URL
.
lstrip
(
"/"
),
urlns
),
static_root
=
os
.
path
.
join
(
static_root
,
urlns
)
urlpatterns
+=
patterns
(
''
,
url
(
url_r
,
'django.views.static.serve'
,
'django.views.static.serve'
,
{
'document_root'
:
os
.
path
.
join
(
static_root
,
urlns
),
{
'document_root'
:
static_root
,
'show_indexes'
:
getattr
(
settings
,
'show_indexes'
:
getattr
(
settings
,
'WEBPROJECT_STATIC_SHOW_INDEXES'
,
True
)}))
'WEBPROJECT_STATIC_SHOW_INDEXES'
,
True
)}))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment