0

这是我的 urlconf(取自 Django 文档)

urlpatterns = patterns('',
 url(r'^admin/password_reset/$', 'django.contrib.auth.views.password_reset', name='admin_password_reset'),
(r'^admin/password_reset/done/$', 'django.contrib.auth.views.password_reset_done'),
(r'^reset/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$', 'django.contrib.auth.views.password_reset_confirm'),
(r'^reset/done/$', 'django.contrib.auth.views.password_reset_complete'),
)

这是错误:

Caught NoReverseMatch while rendering: Reverse for 'django.contrib.auth.views.password_reset_confirm' with arguments '()' and keyword arguments '{'uidb64': 'NTA4MjY0NmZhOWQ3MTk1MDYzMGQyODgy', 'token': '3bv-abcb4fa27b0efa207808'}' not found.

有什么解决办法吗?

4

1 回答 1

1

我认为区别在于查询键:

<uidb36>

是您的 url 正则表达式所期望的

但是您的页面正在发送

'uidb64'
于 2012-10-25T09:59:22.687 回答