0

I am unable to replace default django user model with my own custom user model. yes, i have AUTH_USER_MODEL = 'appName.modelName' set in settings.py

here's my code

settings.py

INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',

'userProfile',
'user_authorisation',
]

AUTH_USER_MODEl = 'userProfile.myUser'

userProfile/models.py https://dpaste.de/Aerm

userProfile.forms.py https://dpaste.de/0eOO

userProfile/admin.py https://dpaste.de/Rm5S

After all this, Default user model is still showing in django admin and also, when creating super user via the command python manage.py createsuperuser , it is creating the super user of the default user model.

Willem Van Onsem
  • 443,496
  • 30
  • 428
  • 555
Vaibhav Gupta
  • 650
  • 7
  • 15

1 Answers1

4

It's typo in your settings AUTH_USER_MODEl, should be AUTH_USER_MODEL instead.

neverwalkaloner
  • 46,181
  • 7
  • 92
  • 100