I have the following line in urls.py
:
url(r'^changepassword/$', 'django.contrib.auth.views.password_change',
{'template_name': 'account/changepass.html',
'post_change_redirect' : reverse('settings')}, name='change_password'),
However, when loading a different view (with a link to this url) I get a TemplateSyntaxError
:
TemplateSyntaxError at /account/
Caught NoReverseMatch while rendering: Reverse for 'change_password' with arguments '()' and keyword arguments '{}' not found.
In template ..../templates/account/settings.html, error at line 7
<p><a href='{% url change_password %}'>Change your password</a>
What could be going wrong?