============================
Django use Email as Username
============================
.. image:: https://badge.fury.io/py/django-use-email-as-username.svg
:target: https://badge.fury.io/py/django-use-email-as-username
.. image:: https://app.travis-ci.com/jmfederico/django-use-email-as-username.svg?branch=main
:target: https://app.travis-ci.com/jmfederico/django-use-email-as-username
.. image:: https://codecov.io/gh/jmfederico/django-use-email-as-username/branch/master/graph/badge.svg
:target: https://codecov.io/gh/jmfederico/django-use-email-as-username
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/ambv/black
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.
.. _`best practices`: https://docs.djangoproject.com/en/dev/topics/auth/customizing/#using-a-custom-user-model-when-starting-a-project
Quickstart
----------
#. Install **Django use Email as Username**:
.. code-block:: shell
# Run in your terminal
pip install django-use-email-as-username
#. Add it to your *INSTALLED_APPS*:
.. code-block:: python
# In your settings.py file
INSTALLED_APPS = (
...
'django_use_email_as_username.apps.DjangoUseEmailAsUsernameConfig',
...
)
#. Create your new django app:
.. code-block:: shell
# Run in your terminal
python manage.py create_custom_user_app
#. Add the new app to your *INSTALLED_APPS*:
.. code-block:: python
# In your settings.py file
INSTALLED_APPS = (
...
'django_use_email_as_username.apps.DjangoUseEmailAsUsernameConfig',
'custom_user.apps.CustomUserConfig',
...
)
#. Now instruct Django to use your new model:
.. code-block:: python
# In your settings.py file
AUTH_USER_MODEL = 'custom_user.User'
#. Create and run migrations:
.. code-block:: shell
# 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.
.. _`good practice`: https://docs.djangoproject.com/en/dev/topics/auth/customizing/#using-a-custom-user-model-when-starting-a-project
.. _`Changing to a custom user model mid-project`: https://docs.djangoproject.com/en/dev/topics/auth/customizing/#changing-to-a-custom-user-model-mid-project
It is recommended to always create a custom User model at the beginning of every
Django project.
Credits
-------
Tools used in rendering this package:
* Cookiecutter_
* `Cookiecutter Django Package`_ by jmfederico_
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`Cookiecutter Django Package`: https://github.com/jmfederico/cookiecutter-djangopackage
.. _jmfederico: https://github.com/jmfederico
Raw data
{
"_id": null,
"home_page": "https://github.com/jmfederico/django-use-email-as-username",
"name": "django-use-email-as-username",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.5",
"maintainer_email": "",
"keywords": "django,email,auth,username",
"author": "Federico Jaramillo Mart\u00ednez",
"author_email": "federicojaramillom@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/41/eb/b83930f39b81116484364f3a7e1dda5e668cda14bf32f43a9b03f3a453bd/django_use_email_as_username-1.3.0.tar.gz",
"platform": null,
"description": "============================\nDjango use Email as Username\n============================\n\n.. image:: https://badge.fury.io/py/django-use-email-as-username.svg\n :target: https://badge.fury.io/py/django-use-email-as-username\n\n.. image:: https://app.travis-ci.com/jmfederico/django-use-email-as-username.svg?branch=main\n :target: https://app.travis-ci.com/jmfederico/django-use-email-as-username\n\n.. image:: https://codecov.io/gh/jmfederico/django-use-email-as-username/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/jmfederico/django-use-email-as-username\n\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n :target: https://github.com/ambv/black\n\nA Django app to use email as username for user authentication.\n\n\nFeatures\n--------\n\n* Custom User model with no username field\n* Use email as username\n* Includes a django-admin command for quick install\n* Follow Django `best practices`_ for new Django projects and User models.\n\n.. _`best practices`: https://docs.djangoproject.com/en/dev/topics/auth/customizing/#using-a-custom-user-model-when-starting-a-project\n\n\nQuickstart\n----------\n\n#. Install **Django use Email as Username**:\n\n .. code-block:: shell\n\n # Run in your terminal\n pip install django-use-email-as-username\n\n#. Add it to your *INSTALLED_APPS*:\n\n .. code-block:: python\n\n # In your settings.py file\n INSTALLED_APPS = (\n ...\n 'django_use_email_as_username.apps.DjangoUseEmailAsUsernameConfig',\n ...\n )\n\n#. Create your new django app:\n\n .. code-block:: shell\n\n # Run in your terminal\n python manage.py create_custom_user_app\n\n#. Add the new app to your *INSTALLED_APPS*:\n\n .. code-block:: python\n\n # In your settings.py file\n INSTALLED_APPS = (\n ...\n 'django_use_email_as_username.apps.DjangoUseEmailAsUsernameConfig',\n 'custom_user.apps.CustomUserConfig',\n ...\n )\n\n#. Now instruct Django to use your new model:\n\n .. code-block:: python\n\n # In your settings.py file\n AUTH_USER_MODEL = 'custom_user.User'\n\n#. Create and run migrations:\n\n .. code-block:: shell\n\n # Run in your terminal\n python manage.py makemigrations\n python manage.py migrate\n\nYou now have a new Django app which provides a custom User model.\n\nYou can further modify the new User Model any time in the future, just remember\nto create and run the migrations.\n\n\nNotes\n-----\n\nThis app gives you a custom User model, which is `good practice`_ for new\nDjango projects.\n\n`Changing to a custom user model mid-project`_ is not easy.\n\n.. _`good practice`: https://docs.djangoproject.com/en/dev/topics/auth/customizing/#using-a-custom-user-model-when-starting-a-project\n.. _`Changing to a custom user model mid-project`: https://docs.djangoproject.com/en/dev/topics/auth/customizing/#changing-to-a-custom-user-model-mid-project\n\nIt is recommended to always create a custom User model at the beginning of every\nDjango project.\n\nCredits\n-------\n\nTools used in rendering this package:\n\n* Cookiecutter_\n* `Cookiecutter Django Package`_ by jmfederico_\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`Cookiecutter Django Package`: https://github.com/jmfederico/cookiecutter-djangopackage\n.. _jmfederico: https://github.com/jmfederico\n",
"bugtrack_url": null,
"license": "BSD-3-Clause",
"summary": "A Django app to use email as username for user authentication.",
"version": "1.3.0",
"split_keywords": [
"django",
"email",
"auth",
"username"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "5f12414fe6e3821b835a80e5cda54c37502bf32f1a36d70229e46103ec2d8c30",
"md5": "8b9713c87193ff3f0200b573ee8e39fc",
"sha256": "9df5e1d688c6aa9f157f1e5c4c1c7b085fb18d66b0299c397984c5ec87d8a8de"
},
"downloads": -1,
"filename": "django_use_email_as_username-1.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "8b9713c87193ff3f0200b573ee8e39fc",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.5",
"size": 7809,
"upload_time": "2023-01-24T10:14:20",
"upload_time_iso_8601": "2023-01-24T10:14:20.504334Z",
"url": "https://files.pythonhosted.org/packages/5f/12/414fe6e3821b835a80e5cda54c37502bf32f1a36d70229e46103ec2d8c30/django_use_email_as_username-1.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "41ebb83930f39b81116484364f3a7e1dda5e668cda14bf32f43a9b03f3a453bd",
"md5": "56bdb719021e061de85a6d430eefaeba",
"sha256": "36b4b3d3446fbcbd6d6c2cc190a1e6b4decf0ae3425d25a5e0b1fe28ad6f32d7"
},
"downloads": -1,
"filename": "django_use_email_as_username-1.3.0.tar.gz",
"has_sig": false,
"md5_digest": "56bdb719021e061de85a6d430eefaeba",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.5",
"size": 5904,
"upload_time": "2023-01-24T10:14:22",
"upload_time_iso_8601": "2023-01-24T10:14:22.988936Z",
"url": "https://files.pythonhosted.org/packages/41/eb/b83930f39b81116484364f3a7e1dda5e668cda14bf32f43a9b03f3a453bd/django_use_email_as_username-1.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-01-24 10:14:22",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "jmfederico",
"github_project": "django-use-email-as-username",
"travis_ci": true,
"coveralls": true,
"github_actions": false,
"tox": true,
"lcname": "django-use-email-as-username"
}