[Answered ]-NoReverseMatch exception while resetting password in django using django's default views

2👍

Your password_reset_confirm URL pattern is out of date. It changed from uidb36 to uidb64 in Django 1.6. It should be:

url(r'^reset/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>.+)/$',
'django.contrib.auth.views.password_reset_confirm',
name='password_reset_confirm'),

Update your password reset email template as well:

{% url 'password_reset_confirm' uidb64=uid token=token %}

In Django 1.8+, you should use the view in your url pattern rather than the string.

from django.contrib.auth.views import password_reset_confirm

urlpatterns = [
    ...
    url(r'^reset/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>.+)/$',
    password_reset_confirm, name='password_reset_confirm'),
    ...
]

Ensure that you

Leave a comment