我的URLconf包含以下模式:Django的“网址”模板标签错误
url(r'^accounts/logout/$','django.contrib.auth.views.logout', name="logout"),
而且我试图扭转在模板与URL标记是这样的:
<a href="{% url logout next_page=request.path %}">logout</a>
但我不断收到以下错误:
Reverse for 'logout' with arguments '()' and keyword arguments '{'next_page': u'/first-page/child/'}' not found
我想django.contrib.auth.views.logout
应该采取一个选项next_page
参数。我确信我错过了一些明显的东西,但我不确定它是什么。
非常感谢。不知道我是如何忽视REDIRECT_FIELD_NAME的。 – saturdayplace 2009-09-03 16:05:57