Django Email User
This is ready to use django user app module which set up all the basic requirements.
🚀 Features
- Email based user authentication
Usage 🚀
mason make django_email_user
Variables ✨
variable | description | default | type |
---|---|---|---|
name | project name | Simple Project | string |
allauth | django-allauth | true | boolean |
Prerequisites 💬
Projects Requirements:
- Blank Django Project
- Django Allauth (https://django-allauth.readthedocs.io/en/latest/)
Installation 📦
INSTALLED_APPS
<- app-name ->
Settings
AUTH_USER_MODEL = '{{name.paramCase()}}.CustomUser'
INSTALLED_APPS = [
...
'{{name.paramCase()}}',
'allauth',
'allauth.account',
'allauth.socialaccount',
...
]
SITE_ID = 1
AUTHENTICATION_BACKENDS = [
# Needed to login by username in Django admin, regardless of `allauth`
'django.contrib.auth.backends.ModelBackend',
# `allauth` specific authentication methods, such as login by e-mail
'allauth.account.auth_backends.AuthenticationBackend',
]
Create superuser
python manage.py createsuperuser