[Django]-'password_reset_confirm' not found. 'password_reset_confirm' is not a valid view function or pattern name

5👍

To get Django to use your app’s registration/password_reset_form.html' template, you need to move that app above django.contrib.admin in your INSTALLED_APPS setting.

Note that Django doesn’t make it easy to use a namespace with the password reset views. Once you have fixed this NoReverseMatch, you may find you have to fix similar errors. It would probably be easier to move your password reset URL patterns into a urls.py that does not have a namespace.

5👍

You need to know that django uses the default template for the email message subject which is (password_reset_email.html) under the name password_reset_confirm, but your are using a namespace, acocunts:password_reset_confirm, all what you need to do is

  1. Override the template path using this attr email_template_name
auth_views.PasswordResetView.as_view(
  template_name ='accounts/registration/password_reset.html',
  email_template_name = 'accounts/registration/password_reset_email.html'),
  1. Set up your email configurations in settings.py to send your email, without getting a error (Errno 111) connection refused

0👍

Instead of writing it like this

reset_password
reset_password_done
reset_password_confirm
reset_password_complete

You need to write it this way

reset_password
password_reset_done
password_reset_confirm
password_reset_complete

it worked for me.

👤dexter

Leave a comment