出现了一些弃用警告。 以下是问题:
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,
以下是URL地址:
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),
]
如何修复?感谢您的时间。