NoReverseMatch error in password reset functionality django

Shiva Krishna Bavandla

I am trying to implement password reset funcitonality in django and below are my codes

urls.py

urlpatterns = patterns('',
    url(r'^signup/$', 'accounts.views.signup', name="signup_email"),
    url(r'^user/password/reset/$', 'django.contrib.auth.views.password_reset', {'template_name':'accounts/forgot_password.html',\
                               'post_reset_redirect' : '/user/password/reset/done/'}, name="reset_password"),
    url(r'^user/password/reset/done/$', 'django.contrib.auth.views.password_reset_done'),

forgot_password.html

     <form accept-charset="UTF-8" action="{% url 'reset_password' %}" class="reset_pass" id="reset_pass" method="post">
            {% csrf_token %}
            <div class="control-group">
                <label class="control-label" for="user_email" style="font-size: 18px; color: #474747">Email</label>
                <div class="controls">
                    <input class="" id="id_email" name="email" type="text" value="">

                </div>
            </div>
            <div class="control-group">
                <div class="controls">
                    <button type="submit" value="reset_password" class="btn btn-primary">Send me reset password</button>
                </div>
            </div>
       </form>

so when we go to the url user/password/reset/ a forgot_password.html is displaying, and when i entered the email and submitted the form i am getting the below errors

enter image description here

and

Error during template rendering

In template /home/user/proj/virtualenvironment/apps/pro_utils/accounts/templates/registration/password_reset_email.html, error at line 7

enter image description here

Can any one please let me know why it is complaining NoReversemtach even though i am using builtin views ?

Rohan

You need to add that url+view in urls.py as below

url(r'^user/password/reset/confirm/$', 
             'django.contrib.auth.views.password_reset_confirm'),

It presents a form for entering a new password.

You may also have to add this as well

url(r'^user/password/reset/complete/$', 
             'django.contrib.auth.views.password_reset_complete'),

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

NoReverseMatch error in password reset functionality django

From Dev

django password reset NoReverseMatch error

From Dev

django password reset NoReverseMatch error

From Dev

NoReverseMatch in Django Password Reset

From Dev

NoReverseMatch in Django Password Reset

From Dev

Django - NoReverseMatch at /accounts/password_reset/

From Dev

NoReverseMatch: in the password reset form in Django-registration?

From Dev

python Django reset password URL NoReverseMatch

From Dev

Upgrade Django and NoReverseMatch password Error

From Dev

NoReverseMatch at account/reset/done in django password reset feature

From Dev

NoReverseMatch after installing django-password-reset Django

From Dev

NoReverseMatch at /accounts/password/reset/confirm

From Dev

NoReverseMatch at /accounts/password/reset/confirm

From Dev

In react, reset password with email functionality

From Dev

NoReverseMatch at /user_details/reset-password

From Dev

Django NoReverseMatch Error With Namespacing

From Dev

DJango - NoReverseMatch Error

From Dev

NoReverseMatch Error Django - UpdateView

From Dev

Django Reverse Error: NoReverseMatch at

From Dev

Django : NoReverseMatch error

From Dev

Django "NoReverseMatch" Error

From Dev

Password reset django 1.6

From Dev

Reset password in Django

From Dev

reset password in Django 1.6

From Dev

Password reset django 1.6

From Dev

django password reset password_reset_confirm

From Dev

Joomla 3.3 Disable "Reset Password" Functionality

From Dev

Django 1.9.2 "reverse" error during password reset attempt

From Dev

Page not found(404) error if reset password email link is wrong in django