This is a custom user model that uses email to authenticate.
-
Clone this github repo.
-
Move the
authentication
folder to your project. -
Add
authentication
toINSTALLED_APPS
insettings.py
INSTALLED_APPS = [
...
'authentication',
]
- Change the
AUTH_USER_MODEL
insettings.py
AUTH_USER_MODEL = 'authentication.User'
- Make migrations
python manage.py makemigrations
- Migrate
python manage.py migrate
That's all! You can use the new user model.