have some deprecation warning. Here is the problem:
RemovedInDjango110Warning: Support for string view arguments to url()
is deprecated and will be removed in Django 1.10
(got django.views.static.serve). Pass the callable instead.
'document_root': settings.MEDIA_ROOT,
Here is the urls:
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^ckeditor/', include('ckeditor_uploader.urls')),
url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {
'document_root': settings.MEDIA_ROOT,
}),
url(r'^post/(\d+)$', post),
url(r'^(\w+)$', category),
url(r'^$', category),
]
How to fix it? Thanks for your time.
Replace function paths in string with actual view functions. For instance:
from django.views.static import serve
...
url(r'^media/(?P<path>.*)$', serve, {
'document_root': settings.MEDIA_ROOT,
}),
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With