0

The method detailed here no longer works. Importing django.contrib.auth.forms.PasswordResetForm results in the custom user class not being available (django.core.exceptions.ImproperlyConfigured: AUTH_USER_MODEL refers to model 'accounts.CustomUser' that has not been installed). How do I send these emails programmatically?

To avoid the X-Y Problem: I don't want user registration. I want admins to be able to create users by supplying an email address, at which point the user receives a password reset email. Upon resetting (more accurately, creating) a password, the user can log in and set a display name and other attributes.

3
  • You haven't added the app accounts to your INSTALLED_APPS setting... (or perhaps a circular import) Commented Aug 6, 2021 at 17:45
  • Does this answer your question? AUTH_USER_MODEL refers to model .. that has not been installed and created AbstractUser models not able to login Commented Aug 6, 2021 at 17:47
  • No, the accounts app works fine without the import. Oddly, the app will actually run if I use, but do not import, the PasswordResetForm; however, it doesn't seem to actually reset the password on creation yet. I'm still working on that. Commented Aug 9, 2021 at 15:13

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.