我想从模板调用视图并将参数传递给视图(见下文)。但是,代码会引发以下错误:
Reverse for 'project_list' with arguments '(u'member',)' and keyword arguments '{}' not found.
从模板:
<a class="btn" href="{% url project_list 'member' %}">Member</a>
从观点来看:
def project_list(request, projects_to_show = 'All'):
if projects_to_show == 'member':
...
来自 urls.py:
url(r'^projects/$', 'project_app.views.project_list', name="project_list"),
我究竟做错了什么?