From: Jan Szejko Date: Tue, 13 Mar 2018 10:55:17 +0000 (+0100) Subject: serve media on debug X-Git-Url: https://git.mdrn.pl/edumed.git/commitdiff_plain/eb86b37548068a37248eeb24b48656a0c88cd034 serve media on debug --- diff --git a/edumed/urls.py b/edumed/urls.py index 47055d9..38005aa 100644 --- a/edumed/urls.py +++ b/edumed/urls.py @@ -43,3 +43,8 @@ urlpatterns += ( url(r'^(?P[^/]*/|)$', lambda request, url: flatpage(request, 'turniej/' + url)), ) + +if settings.DEBUG: + urlpatterns += ( + url(r'^media/(?P.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}), + )