/ admin / password_reset /上的TemplateSyntaxError。解决办法是什么?

时间:2012-10-25 09:39:41

标签: django

这是我的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.

任何解决方案?

1 个答案:

答案 0 :(得分:1)

我认为区别在于查询键:

<uidb36>

是你的url正则表达式所期待的

但您的信息页正在发送

'uidb64'