Django Url, Slug for Detail Page
问题 I'm having trouble configuring my url to display a detail view. Clicking on this link: <a href='{% url blog_detail blog.slug %}'>{{ blog.name }}</a> shows blog.html , when I thought it would show blog-detail.html . There are no errors and the browser bar says: example.com/blog/the-slug , yet still displays the html from blog.html , not blog-detail.html . Any ideas why? Thanks for your ideas. url: url(r'^blog/', 'myapp.views.blog', name='blog'), url(r'^blog/(?P<slug>[\w-]+)/$', 'myapp.views