Answer the question
In order to leave comments, you need to log in
What is the correct way to use PasswordResetForm in Django?
Hello.
I would like to clarify with experienced developers how to properly recover a password in Django.
My implementation:
1) Add to settings.py:
EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp.yandex.ru'
EMAIL_PORT = 25
EMAIL_HOST_USER = '[email protected]'
EMAIL_HOST_PASSWORD = 'W123456'
DEFAULT_FROM_EMAIL = '[email protected]'
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
url('^', include('django.contrib.auth.urls'))
url from django. password_reset_form.html
password_reset_done.html
password_reset_confirm.html
password_reset_complete.html
Answer the question
In order to leave comments, you need to log in
You can customize simply from forms.py if the current page suits you. But for templates, the option is very convenient if you use it in the settings TEMPLATE_DIRS
(since 1.8 TEMPLATES
). When redesigning a project or customizing files, this method will save you a lot of time.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question