Fix deprecation warnings

This commit is contained in:
Jan Tuomi
2017-02-22 15:43:19 +02:00
parent bafc094f40
commit 5fc218323c
2 changed files with 3 additions and 1 deletions
+2 -1
View File
@@ -17,6 +17,7 @@ Including another URLconf
from django.conf.urls import url
from django.contrib import admin
from django.views.generic.base import RedirectView
from django.views.static import serve as static_serve
from django.conf.urls import include
from django.conf.urls.static import static
from django.conf import settings
@@ -127,7 +128,7 @@ urlpatterns = [
# staticfiles default view for static files in development
url(r'^static/(?P<path>.*)$', static_views.serve),
url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
url(r'^media/(?P<path>.*)$', static_serve, {'document_root': settings.MEDIA_ROOT}),
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)