django-registration URL无法解析

时间:2013-07-06 12:35:37

标签: django django-registration

我正在使用django 1.5.1与django-registration 1.0。

我收到错误:

NoReverseMatch at /accounts/password/reset/
Reverse for 'django.contrib.auth.views.password_reset_done' with arguments '()' and     keyword arguments '{}' not found.
Request Method: GET
Request URL:    http://localhost:8000/accounts/password/reset/
Django Version: 1.5.1
Exception Type: NoReverseMatch
Exception Value:    
Reverse for 'django.contrib.auth.views.password_reset_done' with arguments '()' and keyword arguments '{}' not found.

在我的urls.py中我有:

url(r'^accounts/', include('registration.backends.default.urls', namespace='re    gistration', app_name='registration')),

之前有人遇到过这方面的问题吗?

1 个答案:

答案 0 :(得分:0)

只需包含以下行,它应该有效: url(r'accounts/', include('django.contrib.auth.urls')),

我的urls.py: ``` 来自django.conf.urls导入模式,include,url

来自django.contrib import admin admin.autodiscover()

urlpatterns = patterns('',     # 例子:     #url(r' ^ $',' django_registration_demo.views.home',name =' home'),     #url(r' ^ blog /',include(' blog.urls')),

url(r'^admin/', include(admin.site.urls)),
url(r'accounts/', include('django.contrib.auth.urls')),
url(r'^accounts/', include('registration.backends.default.urls'))

) ```