【发布时间】:2016-06-04 11:13:03
【问题描述】:
尝试使用 url 标签时总是出现此错误:
Reverse for 'show' with arguments '()' and keyword arguments
'{}' not found. 1 pattern(s) tried: ['app/$show/']
我的网址标签:
<a href="{% url 'show' %}"> item </a>
url.py
url(r'^app/$', include('app.urls')),
app.url.py
url(r'^$', 'app.views.index', name='app_index'),
url(r'^show/', 'app.views.show', name='show'),
有什么问题吗?一直关注 Django 文档并在互联网上搜索没有结果。
【问题讨论】:
标签: python django python-2.7