You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
as you can see here ¶ If you reference User directly (for example, by referring to it in a foreign key), your code will not work in projects where the AUTH_USER_MODEL setting has been changed to a different user model.
In your RegistrationForm you do just that, which causes an error Manager isn't available; 'auth.User' has been swapped for 'users.User'
As I see it only happens in one form in forms.py, so fixing this problem and making your users' lives will be very easy.
from django.contrib.auth import get_user_model # model = User model = get_user_model()
The text was updated successfully, but these errors were encountered:
as you can see here
¶ If you reference User directly (for example, by referring to it in a foreign key), your code will not work in projects where the AUTH_USER_MODEL setting has been changed to a different user model.
In your
RegistrationForm
you do just that, which causes an error Manager isn't available; 'auth.User' has been swapped for 'users.User'As I see it only happens in one form in forms.py, so fixing this problem and making your users' lives will be very easy.
from django.contrib.auth import get_user_model
# model = User
model = get_user_model()
The text was updated successfully, but these errors were encountered: