My URLconf contains this pattern:
url(r'^accounts/logout/$','django.contrib.auth.views.logout', name="logout"),
And I've trying to reverse that in a template with the URL tag like this:
<a href="{% url logout next_page=request.path %}">logout</a>
But I keep getting the following error:
Reverse for 'logout' with arguments '()' and keyword arguments '{'next_page': u'/first-page/child/'}' not found
I thought django.contrib.auth.views.logout
is supposed to take an option next_page
parameter. I'm sure I'm missing something obvious, but I'm not sure what it is.