2👍
✅
global_settings
is, as the name implies, the global default settings supplied by Django. So of course the default is ‘auth.User’.
Since you override it in your own settings, you should import that instead. But as the documentation says, the way to import the current settings is always from django.conf import settings
, rather than explicitly importing a settings file in your project.
Also note though that rather than using the settings at all here – which could lead to some dependency issues on startup – you should be using get_user_model()
from django.contrib.auth
, as explained in the documentation.
Source:stackexchange.com