X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/5dd35dc51c94ec63a25ad17dca4259e7e80e2bc0..37e03d34aec3af64d322f0c76d49dba46ee29f92:/project/urls.py?ds=sidebyside diff --git a/project/urls.py b/project/urls.py index ec919ae3..972c33dd 100644 --- a/project/urls.py +++ b/project/urls.py @@ -37,9 +37,9 @@ urlpatterns = patterns('', # Static files -if settings.DEBUG: +if settings.DEBUG and not hasattr(settings, 'DONT_SERVE_STATIC'): urlpatterns += patterns('', - url(r'^%s(?P.+)$' % settings.MEDIA_URL[1:], 'django.views.static.serve', + url(r'^%s(?P.+)$' % settings.MEDIA_URL[1:], 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}), url(r'^%s(?P.+)$' % settings.STATIC_URL[1:], 'django.views.static.serve', {'document_root': settings.STATIC_ROOT, 'show_indexes': True}),