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.

Kenny
  • 195
  • 1
  • 7
  • You haven't added the app `accounts` to your `INSTALLED_APPS` setting... (or perhaps a circular import) – Abdul Aziz Barkat Aug 06 '21 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](https://stackoverflow.com/questions/14699598/auth-user-model-refers-to-model-that-has-not-been-installed-and-created-abstr) – Abdul Aziz Barkat Aug 06 '21 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. – Kenny Aug 09 '21 at 15:13

0 Answers0