Custom Forgot Password in Django

Published On: 19 December 2020.By .
  • Digital Engineering
  • General

Custom-Forgot-Password-in-Django

Custom Forgot Password Functionality in Django Admin Site

AIM:

As for now, the Django Admin Site does not provide to reset the 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 the **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 }}

 

 

Password Reset Confirm

 


 

Please enter your new password.

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

 

{% endblock %}


CodeTest

d

Related content

That’s all for this blog

Go to Top