###前提・実現したいこと
DjangoGirlsというチュートリアルに従って、Pythonのdjangoを使いblogを作成しようとしています。そこで、ブログの一覧ページは作成できたものの、ページの詳細ページに行こうとするとエラーが出てしまいました。
■ チュートリアル
###試してみたこと①
post_list.htmlを以下のように変更しましたが、エラーが出ました。
before
<h1><a href="(% url 'posts.views.post_detail' pk=post.pk %)">{{ post.title }}</a></h1>
after
<h1><a href="{% url 'posts.views.post_detail' pk=post.pk %}">{{ post.title }}</a></h1>
###試してみたこと②
post_list.html
//before <h1><a href="{% url 'blog.views.post_detail' pk=post.pk %}">{{ post.title }}</a></h1> //after <h1><a href="{% url 'detail' pk=post.pk %}">{{ post.title }}</a></h1>
回答1件
あなたの回答
tips
プレビュー