Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

A Django app to use email as username for user authentication.

Project description

https://badge.fury.io/py/django-use-email-as-username.svg https://travis-ci.org/jmfederico/django-use-email-as-username.svg?branch=master https://codecov.io/gh/jmfederico/django-use-email-as-username/branch/master/graph/badge.svg https://img.shields.io/badge/code%20style-black-000000.svg

A Django app to use email as username for user authentication.

Features

  • Custom User model with no username field
  • Use email as username
  • Includes a django-admin command for quick install
  • Follow Django best practices for new Django projects and User models.

Quickstart

  1. Install Django use Email as Username:

    $ pip install django-use-email-as-username
    
  2. Add it to your INSTALLED_APPS:

    INSTALLED_APPS = (
        ...
        'django_use_email_as_username.apps.DjangoUseEmailAsUsernameConfig',
        ...
    )
    
  3. Create you new django app:

    $ python manage.py create_custom_user_app
    
  4. Add the new app to your INSTALLED_APPS:

    INSTALLED_APPS = (
        ...
        'django_use_email_as_username.apps.DjangoUseEmailAsUsernameConfig',
        'custom_user.apps.CustomUserConfig',
        ...
    )
    
  5. Now instruct Django to use your new model:

    AUTH_USER_MODEL = 'custom_user.User'
    
  6. Create and run migrations:

    $ python manage.py makemigrations
    $ python manage.py migrate
    

You now have a new Django app which provides a custom User model.

You can further modify the new User Model any time in the future, just remember to create and run the migrations.

Notes

This app gives you a custom User model, which is good practice for new Django projects.

Changing to a custom user model mid-project is not easy.

It is recommended to always create a custom User model at the beginning of every Django project.

Credits

Tools used in rendering this package:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-use-email-as-username, version 1.0.2
Filename, size File type Python version Upload date Hashes
Filename, size django_use_email_as_username-1.0.2-py3-none-any.whl (11.7 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size django-use-email-as-username-1.0.2.tar.gz (7.3 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page