From eb86b37548068a37248eeb24b48656a0c88cd034 Mon Sep 17 00:00:00 2001 From: Jan Szejko Date: Tue, 13 Mar 2018 11:55:17 +0100 Subject: [PATCH] serve media on debug --- edumed/urls.py | 5 +++++ 1 file changed, 5 insertions(+) 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}), + ) -- 2.20.1