index.html中url 报错的
完全按照老师的方法写出来的
url(r'^blog/', include('blog.urls', namespace='blog')),
url(r'^detail/(?P<articleId>[0-9]+)/$', views.detail, name='detail'), # 参数为数字 文章详情
<a href="{% url 'blog:detail' article.id %}">{{ article.title }}</a>
改成<a href="/blog/{{ article.id }}">{{ article.title }}</a> 就好的呢,好奇怪
我用的是
Django Version:
1.11.4
Python Version:
3.6.1