Django password_reset url和password_reset_confirm

时间:2018-10-22 13:55:11

标签: django

帐户/urls.py

 password_reset_dict =   {
                    'template_name': 'registration/reset_password.html',
                    'email_template_name': 'registration/password_reset_email.hmtl',
                    'html_email_template_name': 'registration/password_reset_email.html',
                    'subject_template_name': 'registration/password_reset_subject.txt',
                    'password_reset_form': EmailValidationOnForgotPassword,
                    }

等等...

path('sifre-sifirla/', PasswordResetView.as_view(), password_reset_dict, name='password_reset'),
re_path('sifre-sifirla/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/',PasswordResetConfirmView.as_view(), name='password_reset_confirm'),

password_reset_email.html

{{ protocol }}://{{ domain }}{% url 'password_reset_confirm' uidb64=uid token=token %}

将网址返回为:

http://localhost:8000/uye/yeni-sifre/MTU/**set-password**/

问题是,如何将**set-password**更改为我的母语?

谢谢。

1 个答案:

答案 0 :(得分:1)

目前无法执行此操作。有一张公开票证#28780,可以添加此功能。