|
报错 Reverse for 'detail' with arguments '(1,)' not found. 1 pattern(s) tried: ['home\\/detail\\/\\<int\\:topic\\.id\\>$']
我的url配置:
path('detail/<int:topic.id>',views.topic,name='detail')
模板:
<ul>
{% for topic in topics %}
<li>
<a href="{% url 'detail' topic.id %}">{{ topic }}</a>
</li>
{% empty %}a
<p>no have topic yet.</p>
{% endfor %}
</ul>
我是完全按照django文档来的,各种方法都试过了,始终解不了,求大神搭救!
|
|