Django email_users is a simple Django app which uses email address to identify users instead of the username.
Package was tested with
- Python 3.8, 3.10
- Django 3.2, 4.0, 4.1
If you intend to use it with Django Rest Framework then following versions were tested
3.13.1
For pip use the following command
$ pip install git+https://github.com/eugenma/django-emailuser.git#egg=django-emailuser
Add 'email_user' to your INSTALLED_APPS setting like this:
- INSTALLED_APPS = [
... 'email_user',
]
Set AUTH_USER_MODEL to 'email_user.EmailUser' in settings like this:
AUTH_USER_MODEL = 'email_user.EmailUser'
Run python manage.py migrate to create the models.
All settings are stored within the dictionary DJANGO_EMAIL_USER. The values are
STORE_METHOD configuration of the email case handling
The possible values are
- exact - save the email as is without modifying the case,
- lower - convert everything to lower case,
- normalize - calls BaseUserManager.normalize_email(). This is the behaviour of the previous versions.
Take care if you change this config in a running project. It changes the way how the fields are stored and retrieved.