Django reset_password_confirm TemplateSyntaxError problem

后端 未结 8 1416
夕颜
夕颜 2020-12-13 20:39

when I use django.contrib.auth.views.password_reset_confirm without arguments at all it works and I can render the template without any problem, when adding

8条回答
  •  臣服心动
    2020-12-13 21:21

    If you're using Django 1.6+ and run into something like this it could be that you need to update uidb36 to uidb64 in both your template and your urls.

    Example url: url(r'^password/reset/confirm/(?P[0-9A-Za-z]+)-(?P.+)/$', auth_views.password_reset_confirm

    and reset link in template:

    {{ protocol}}://{{ domain }}{% url 'django.contrib.auth.views.password_reset_confirm' uidb64=uid token=token %}

提交回复
热议问题