I'm using Django's built in reset password views with custom templates. Although it works successfully, it does not show an error message if the email id submitted is not already registered in the site.
I followed the instructions here to help me reach till this point.
#urls.py
url(r'^users/password/reset/$',
'django.contrib.auth.views.password_reset',
{'post_reset_redirect' : '/users/password/reset/done/'},
name="reset_password"
),
url(r'^users/password/reset/done/$',
'django.contrib.auth.views.password_reset_done'
),
url(r'^users/password/reset/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>.+)/$',
'django.contrib.auth.views.password_reset_confirm',
{'post_reset_redirect' : '/users/password/done/'}
),
url(r'^users/password/done/$',
'django.contrib.auth.views.password_reset_complete'
),
Whatever email id I give, Django always redirects me to /users/password/reset/done/ which says:
We've e-mailed you instructions for setting your password to the e-mail address
you submitted.
You should be receiving it shortly.
This is misleading, since users might've entered their email address wrong and still be seeing the above page.
How do I show an error message if the email address is not registered?
Thanks in advance.