1

我正在使用 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')),

以前有人遇到过这个问题吗?

4

1 回答 1

0

只需包括以下几行,它应该可以工作: url(r'accounts/', include('django.contrib.auth.urls')),

我的 urls.py: ``` from django.conf.urls import patterns, include, url

从 django.contrib 导入管理员 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'))

) ```

于 2014-04-12T13:28:58.987 回答