Custom Forgot Password in Django

Custom-Forgot-Password-in-Django

Custom Forgot Password Functionality in Django Admin Site

AIM:

As for now Django Admin Site does not provide to reset password without login or when we forget the Current Password.
This Blog will make you understand how can you set up your Django application with **Forgot Password** module.

Prerequisite:

minimum required Setup:

Steps to complete the setup:
* First create a view for login which will start the custom forgot password flow.
1. In template directory create file named:

2. Add this template in admin site for login view.

Now you will see the Forgot password link in your Django login site.
As shown in Image.

3. Now add password reset functionality and all other templates of reset password.

Other Templates:

 

Reset Password

Forgotten your password? Enter your email address below, and we’ll email instructions for setting a new one.

{% csrf_token %} {{ password_reset_form|crispy }}

 

{% endblock %}

Your password has been set. You may go ahead and log in now. Log in

{% endblock %}

 

Password Reset Confirm

 


Please enter your new password.

{% csrf_token %} {{ form|crispy }}

{% endblock %}

 

Password Reset Confirm

 


Please enter your new password.

{% csrf_token %} {{ form|crispy }}

{% endblock %}

Comments