Django is a good framework, very complete, with a built-in user system, we can send reset password emails with a little modification.
url.py
1 |
from django.contrib.auth import views as auth_views |
templates settings
Copy the django/contrib/auth/templates/registration
following files to the registration in your templates directory:
1 |
password_reset_subject.txt |
Copy the django/contrib/admin/templates/registration
following files to the registration in your templates directory:
1 |
logged_out .html |
You can define it according to your own needs. I deleted the logged_out.html file, added the login.html written by myself, and then added the logged_out.html file in all files.
1 |
{% extends admin/base_site.html %} |
After doing this, it still doesn't work, because the base.html file is required:
1 |
<html> |
test
Click forgot password:
Enter your own email address.
After a while you will receive an email:
The content is:
If you want to modify the content of the email, you can modify the templates/registration/password_reset_email.html
file.