first comit

This commit is contained in:
2024-02-23 10:30:02 +00:00
commit ddeb07d0ba
12482 changed files with 1857507 additions and 0 deletions

View File

@@ -0,0 +1,144 @@
Metadata-Version: 2.1
Name: django-use-email-as-username
Version: 1.4.0
Summary: A Django app to use email as username for user authentication.
Keywords: django email auth username
Author-Email: Federico Jaramillo Martínez <federicojaramillom@gmail.com>
License: BSD-3-Clause
Classifier: Development Status :: 5 - Production/Stable
Classifier: Framework :: Django
Classifier: Framework :: Django :: 1.11
Classifier: Framework :: Django :: 2.0
Classifier: Framework :: Django :: 2.1
Classifier: Framework :: Django :: 2.2
Classifier: Framework :: Django :: 3.0
Classifier: Framework :: Django :: 3.1
Classifier: Framework :: Django :: 3.2
Classifier: Framework :: Django :: 4.0
Classifier: Framework :: Django :: 4.1
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Project-URL: Repository, https://github.com/jmfederico/django-use-email-as-username
Requires-Python: >=3.7
Requires-Dist: django>=1.11
Requires-Dist: codecov; extra == "testing"
Requires-Dist: coverage; extra == "testing"
Provides-Extra: testing
Description-Content-Type: text/x-rst
============================
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://github.com/jmfederico/django-use-email-as-username/actions/workflows/tests.yml/badge.svg
:target: https://github.com/jmfederico/django-use-email-as-username/actions/workflows/tests.yml
.. 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

View File

@@ -0,0 +1,22 @@
django_use_email_as_username-1.4.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
django_use_email_as_username-1.4.0.dist-info/METADATA,sha256=_LJB9lfqSkLzAMxA-y2atAPl8UJhBKqH2XYUEcxNlo4,4430
django_use_email_as_username-1.4.0.dist-info/RECORD,,
django_use_email_as_username-1.4.0.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
django_use_email_as_username-1.4.0.dist-info/WHEEL,sha256=95rUZ-P2VVLQI24cnYGJ4rMuEceVCnC4gS0UY4Um5ek,90
django_use_email_as_username-1.4.0.dist-info/licenses/AUTHORS.rst,sha256=Qu83bFk9XTdwxnnj-mZYMGKVIF-JdDgnpsqzF-60hGA,178
django_use_email_as_username-1.4.0.dist-info/licenses/LICENSE,sha256=bL2wiPoBhFLW7qD0jfl5oWOoAR2tl9aZkHBCJAed5TI,1536
django_use_email_as_username/__init__.py,sha256=8UhoYEXHs1Oai7BW_ExBmuwWnRI-yMG_u1fQAXMizHQ,22
django_use_email_as_username/__pycache__/__init__.cpython-310.pyc,,
django_use_email_as_username/__pycache__/admin.cpython-310.pyc,,
django_use_email_as_username/__pycache__/apps.cpython-310.pyc,,
django_use_email_as_username/__pycache__/models.cpython-310.pyc,,
django_use_email_as_username/admin.py,sha256=GJ-75RiVOCksik4BeBQGUIASRDj-aFtv5ZmeFOZrTOY,1080
django_use_email_as_username/apps.py,sha256=_mAUVO_JtZX_ooX-Pnr_FKExeKHUDQEn4HpClFBg7qY,236
django_use_email_as_username/management/commands/__pycache__/create_custom_user_app.cpython-310.pyc,,
django_use_email_as_username/management/commands/app_template/__init__.py-tpl,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
django_use_email_as_username/management/commands/app_template/admin.py-tpl,sha256=6UCc0gP1Z6DREtNLoo8r13DwcGZTT2u9sYn_Fa9wR6w,162
django_use_email_as_username/management/commands/app_template/apps.py-tpl,sha256=lz3VLstBKXyBlrvEC2OW5UoLAd2aRMljPU9T_ooSmIg,158
django_use_email_as_username/management/commands/app_template/migrations/__init__.py-tpl,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
django_use_email_as_username/management/commands/app_template/models.py-tpl,sha256=Vv57vl8i3qb28lqh94ABVYb-HueRFComIKVolKdTSuY,130
django_use_email_as_username/management/commands/create_custom_user_app.py,sha256=jDbJUq7jqc3998D7PRdC0Ln6ewQ3trsMQhzFmgesGd8,1210
django_use_email_as_username/models.py,sha256=ZgswmwUJuuZjWJSAf8SXeoAIhjl3x1_uiPAGD5CkaTs,1995

View File

@@ -0,0 +1,4 @@
Wheel-Version: 1.0
Generator: pdm-backend (2.1.3)
Root-Is-Purelib: true
Tag: py3-none-any

View File

@@ -0,0 +1,13 @@
=======
Credits
=======
Development Lead
----------------
* Federico Jaramillo Martínez <federicojaramillom@gmail.com>
Contributors
------------
* Gregor <ggrreg@gmail.com>

View File

@@ -0,0 +1,29 @@
BSD 3-Clause License
Copyright (c) 2018, Federico Jaramillo Martínez
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.