A Django app with a custom user model setup. This uses an email address instead of a username to login.
- Clone this repository into a folder named core within your Django folder.
git clone https://github.com/majormunky/DjangoCoreApp.git core
- Open your project settings.py file
- Add this setting to the bottom of the file
AUTH_USER_MODEL = "core.CoreUser"
- Add core to the list of INSTALLED_APPS
- Run:
python manage.py makemigrations core
python manage.py migrate
- That should be it!
Normally Django will set you up with a user model that uses a username. I prefer to just use an email address instead, so this is an easy way for me to get that setup.
This app will define a custom user model that uses an email address as the username.