Revision 6f284708 snf-webproject/synnefo/webproject/urls.py
b/snf-webproject/synnefo/webproject/urls.py | ||
---|---|---|
66 | 66 |
{'document_root': static_root, |
67 | 67 |
'show_indexes': getattr(settings, |
68 | 68 |
'WEBPROJECT_STATIC_SHOW_INDEXES', True)})) |
69 |
|
|
69 | 70 |
else: |
70 | 71 |
# app contains static files in <appname>/static/<appname> |
71 | 72 |
for fpath in os.listdir(static_root): |
72 | 73 |
urlns = ns + fpath |
73 |
urlpatterns += patterns('', url(r'^%s%s/(?P<path>.*)$' % \ |
|
74 |
(settings.MEDIA_URL.lstrip("/"), urlns), |
|
74 |
url_r = r'^%s%s/(?P<path>.*)$' % (settings.MEDIA_URL.lstrip("/"), urlns) |
|
75 |
static_root = os.path.join(static_root, urlns) |
|
76 |
urlpatterns += patterns('', url(url_r, |
|
75 | 77 |
'django.views.static.serve', |
76 |
{'document_root': os.path.join(static_root, urlns),
|
|
78 |
{'document_root': static_root,
|
|
77 | 79 |
'show_indexes': getattr(settings, |
78 | 80 |
'WEBPROJECT_STATIC_SHOW_INDEXES', True)})) |
79 | 81 |
|
Also available in: Unified diff