Reputation: 864
I just installed the Django-Registration app and I have everything working except I can not figure out the password reset methods. Whenever I navigate to accounts/password/reset/ I get the following error:
Reverse for 'password_reset_done' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: [] Any ideas? Is there some problems with the django-registration urls?
Update:
I have added the following lines of code from a previous post here: Django 1.6 and django-registration: built-in authentication views not picked up
into my registration/backends/default/urls.py
url(r'^password/change/$',
auth_views.password_change,
name='password_change'),
url(r'^password/change/done/$',
auth_views.password_change_done,
name='password_change_done'),
url(r'^password/reset/$',
auth_views.password_reset,
name='password_reset'),
url(r'^password/reset/done/$',
auth_views.password_reset_done,
name='password_reset_done'),
url(r'^password/reset/complete/$',
auth_views.password_reset_complete,
name='password_reset_complete'),
url(r'^password/reset/confirm/(?P<uidb64>[0-9A-Za-z]+)-(?P<token>.+)/$',
auth_views.password_reset_confirm,
name='password_reset_confirm'),
#and now add the registration urls
url(r'', include('registration.backends.default.urls')),
and then I added the following import:
from django.contrib.auth import views as auth_views
But then when I run the program after my server restart I get the following error message:
Exception Type: RuntimeError Exception Value: maximum recursion depth exceeded while calling a Python object Exception Location: /home/ubuntu/django-skippl/local/lib/python2.7/site-packages/Django-1.6.2- py2.7.egg/django/utils/datastructures.py in init, line 287 Python Executable: /home/ubuntu/django-skippl/bin/python
Upvotes: 0
Views: 1953
Reputation: 2566
This is should work :
url(r'^accounts/', include('registration.backends.simple.urls')),
url(r'^accounts/password/reset/done/$', 'django.contrib.auth.views.password_reset_done',
name='password_reset_done'),
Upvotes: 0
Reputation: 1527
try this urls.py
import os
from django.contrib.auth import views as auth_views
from django.conf.urls import patterns, include, url
from django.conf import settings
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
url(r'^accounts/', include('registration.backends.default.urls')),
#override the default urls
url(r'^password/change/$',
auth_views.password_change,
name='password_change'),
url(r'^password/change/done/$',
auth_views.password_change_done,
name='password_change_done'),
url(r'^password/reset/$',
auth_views.password_reset,
name='password_reset'),
url(r'^password/reset/done/$',
auth_views.password_reset_done,
name='password_reset_done'),
url(r'^password/reset/complete/$',
auth_views.password_reset_complete,
name='password_reset_complete'),
url(r'^password/reset/confirm/(?P<uidb64>[0-9A-Za-z]+)-(?P<token>.+)/$',
auth_views.password_reset_confirm,
name='password_reset_confirm'),
url(r'^admin/', include(admin.site.urls)),
)
Upvotes: 0