Skip to content Skip to sidebar Skip to footer

Reverse For 'password_change_done' With Arguments '()' And Keyword Arguments '{}' Not Found. 0 Pattern(s) Tried: []

I am getting the following error in Django. Reverse for 'password_change_done' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: []. I am not really sur

Solution 1:

Since you add password_change inside application's url.py you should to specify post_change url including application name using post_change_redirect argument:

url(r'^password-change/$', password_change, {'post_change_redirect': 'account:password_change_done'}, name='password_change'),
url(r'^password-change/done/$', password_change_done, name='password_change_done'),

where account is a namespace of application urls.


Solution 2:

The problem is likely that your URLs are namespaced and you forgot to use the namespace. Try:

{% url 'account:password_change_done' %}

or

reverse('account:password_change_done')

Remember to namespace your names, otherwise django might not be able to find them. You can find the namespace that you are using (if it is not account) by looking at where you are including the urls for login, etc. It should look something like:

url(r'account/', include('account.urls', namespace='account')),

Post a Comment for "Reverse For 'password_change_done' With Arguments '()' And Keyword Arguments '{}' Not Found. 0 Pattern(s) Tried: []"