参考我的上一个问题只能将元组(不是“unicode”)连接到元组
现在,当我尝试在媒体文件的URL上获取请求时,出现以下错误。
Page not found (404)
Request Method: GET
Request URL: http://localhost:8000/media/media/abyss.jpg
网址.py
urlpatterns = patterns('',
url(r'^admin/', include(admin.site.urls)),
url(r'^$', 'blog.views.index'),
url(r'^blog/(?P<slug>[\w\-]+)/$', 'blog.views.article'),
url(r'^(.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
)