Add entry to urls.py for media files

This commit is contained in:
Juhana
2017-02-22 15:19:15 +02:00
parent 22e8e3d995
commit beb36064f9
2 changed files with 2 additions and 0 deletions
View File
+2
View File
@@ -127,5 +127,7 @@ urlpatterns = [
# staticfiles default view for static files in development # staticfiles default view for static files in development
url(r'^static/(?P<path>.*)$', static_views.serve), url(r'^static/(?P<path>.*)$', static_views.serve),
url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) ] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)