Skip to content

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

License

Notifications You must be signed in to change notification settings

jmfederico/django-use-email-as-username

Repository files navigation

🔔 PROJECT STATUS 🔔

Life has taken me to now work in GO, and do not have the time to actively maintain this project.

Which means this project is looking for new maintainer, please open an issue and postulate yourself if interested.

Django use Email as Username

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:

    # Run in your terminal
    pip install django-use-email-as-username
  2. Add it to your INSTALLED_APPS:

    # In your settings.py file
    INSTALLED_APPS = (
        ...
        'django_use_email_as_username.apps.DjangoUseEmailAsUsernameConfig',
        ...
    )
  3. Create your new django app:

    # Run in your terminal
    python manage.py create_custom_user_app
  4. Add the new app to your INSTALLED_APPS:

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

    # In your settings.py file
    AUTH_USER_MODEL = 'custom_user.User'
  6. Create and run migrations:

    # Run in your terminal
    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:

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages