Fix deprecation warnings
This commit is contained in:
@@ -13,3 +13,4 @@ webapp/migrations/*
|
|||||||
logs/
|
logs/
|
||||||
static/
|
static/
|
||||||
node_modules/
|
node_modules/
|
||||||
|
media/
|
||||||
|
|||||||
+2
-1
@@ -17,6 +17,7 @@ Including another URLconf
|
|||||||
from django.conf.urls import url
|
from django.conf.urls import url
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from django.views.generic.base import RedirectView
|
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 import include
|
||||||
from django.conf.urls.static import static
|
from django.conf.urls.static import static
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
@@ -127,7 +128,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}),
|
url(r'^media/(?P<path>.*)$', 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)
|
||||||
|
|||||||
Reference in New Issue
Block a user