From 96bd3d6df862fa1bcd169fdb61e91c98158adcc1 Mon Sep 17 00:00:00 2001 From: j Date: Tue, 14 Nov 2017 16:53:50 +0100 Subject: [PATCH] don't serve debug data by default --- pandora/urls.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pandora/urls.py b/pandora/urls.py index fd50c8cf..2ced85a5 100644 --- a/pandora/urls.py +++ b/pandora/urls.py @@ -69,14 +69,14 @@ urlpatterns = [ url(r'^sitemap.xml$', item.views.sitemap_xml), url(r'', include(item.urls)), ] -#if settings.DEBUG: #sould this not be enabled by default? nginx should handle those -urlpatterns += [ - url(r'^data/(?P.*)$', django.views.static.serve, - {'document_root': settings.MEDIA_ROOT}), - url(r'^static/(?P.*)$', django.views.static.serve, - {'document_root': settings.STATIC_ROOT}), -] +if settings.DEBUG: + urlpatterns += [ + url(r'^data/(?P.*)$', django.views.static.serve, + {'document_root': settings.MEDIA_ROOT}), + url(r'^static/(?P.*)$', django.views.static.serve, + {'document_root': settings.STATIC_ROOT}), + ] urlpatterns += [ url(r'^(V[a-z0-9]+)$', urlalias.views.padma_video),