NoReverseMatch错误,尝试在Django中设置详细的页面视图

时间:2014-12-15 17:11:29

标签: python django django-templates django-urls

我试图设置一个详细的页面,以便每次有人点击文章的链接时,都会将他们带到有关该文章的详细页面。我觉得错误发生在urls.py或我list.html文件中的实际网址中。

更新#1 - 更改了FullArticle_detailed到urls.py中的详细信息 - 我收到NoReverseMatch错误提示,突出显示我的list.html

中的第26行
Reverse for 'detailed' with arguments '()' and keyword arguments '{u'slug': ''}' not found. 1 pattern(s) tried: ['(?P<slug>\\S+)$']

这是错误的屏幕截图: enter image description here

这是我的Sublime的截图: enter image description here

1 个答案:

答案 0 :(得分:3)

网址name中存在不匹配:

您使用detailed的模板中的

,但在urls.py中有FullArticle_detailed