Skip to content

Custom User Model, Authentication, Templates, Email as username

License

Notifications You must be signed in to change notification settings

Antonio-Neves/Custom-User-Django-en

Repository files navigation

Custom User Django - English

Custom User Model, Authentication, Templates, Email as username

Warning: Define 'Custom User model' in 'settings.py' file.

AUTH_USER_MODEL = 'accounts.CustomUser'

And in 'settings.py' to, the app where is the custom user model, must be before 'django.contrib.admin',

# Application definition
INSTALLED_APPS = [
    'accounts',
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',


Live Preview


Attention:
To hide sensitive values in the settings.py file, such as directions and passwords, I use Python Decouple.
Instructions at https://pypi.org/project/python-decouple/
In the repository, rename the file '.env.example' to '.env' and make the necessary changes to your data.