django-email-user

Abstract models + utils to replace `django.contrib.auth.User` with a model that uses an email address instead of a username


License
MIT
Install
pip install django-email-user==1.0.1

Documentation

django-email-user

Abstract models + utils to replace django.contrib.auth.User with a model that uses an email address instead of a username.

Installation

pip install django-email-user

Usage:

# my_auth/models.py

from email_user.models import EmailBasedUser


class User(EmailBasedUser):
    pass
# my_auth/admin.py

from email_user.admin import EmailBasedUserAdmin
from django.contrib.admin import register
from . import models


@register(models.User)
class UserAdmin(EmailBasedUserAdmin):
    pass
# in project settings

INSTALLED_APPS = (
    # '...',
    'my_auth',
)

AUTH_USER_MODEL = 'my_auth.User'

History

This codebase is largely derived from django-generic and django-polymorphic-auth.