标签:keyword 开发问题总结 pre 问题 match att argument sem view
django开发问题总结
报错如下
NoReverseMatch at /blog/
Reverse for 'blog_detail' with keyword arguments '{'blog_id': 10}' not found. 1 pattern(s) tried: ['blog/detail/(?P[1-9]+)/$']
将
url(r'^detail/(?P<blog_id>[1-9]+)/$', views.detail,name='blog_detail'),
改为
url(r'^detail/(?P<blog_id>\d+)/$', views.detail,name='blog_detail'),
#或改为
url(r'^detail/(?P<blog_id>[0-9]+)/$', views.detail,name='blog_detail'),
标签:keyword 开发问题总结 pre 问题 match att argument sem view
原文地址:https://www.cnblogs.com/anyux/p/11922049.html