{ "info": { "author": "Josep Cugat", "author_email": "jcugat@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "Django Custom User\n==================\n\n.. image:: https://img.shields.io/pypi/v/django-custom-user.svg\n :target: https://pypi.python.org/pypi/django-custom-user\n\n.. image:: https://img.shields.io/travis/jcugat/django-custom-user/master.svg\n :target: https://travis-ci.org/jcugat/django-custom-user\n\n.. image:: https://img.shields.io/codecov/c/github/jcugat/django-custom-user/master.svg\n :target: https://codecov.io/gh/jcugat/django-custom-user\n\n.. image:: https://img.shields.io/pypi/dm/django-custom-user.svg\n :target: https://pypi.python.org/pypi/django-custom-user\n\n\nCustom user model for Django >= 1.5 with the same behaviour as Django's default User but without a username field. Uses email as the USERNAME_FIELD for authentication.\n\n\nQuick start\n-----------\n\n1. Install django-custom-user with your favorite Python package manager:\n\n.. code-block::\n\n pip install django-custom-user\n\n\n2. Add ``'custom_user'`` to your ``INSTALLED_APPS`` setting:\n\n.. code-block:: python\n\n INSTALLED_APPS = (\n # other apps\n 'custom_user',\n )\n\n\n3. Set your ``AUTH_USER_MODEL`` setting to use ``EmailUser``:\n\n.. code-block:: python\n\n AUTH_USER_MODEL = 'custom_user.EmailUser'\n\n\n4. Create the database tables:\n\n.. code-block::\n\n python manage.py migrate\n\nOr if you are using an old Django version (<=1.6):\n\n.. code-block::\n\n python manage.py syncdb\n\n\nUsage\n-----\n\nInstead of referring to ``EmailUser`` directly, you should reference the user model using ``get_user_model()`` as explained in the `Django documentation`_. For example:\n\n.. _Django documentation: https://docs.djangoproject.com/en/dev/topics/auth/customizing/#referencing-the-user-model\n\n.. code-block:: python\n\n from django.contrib.auth import get_user_model\n\n user = get_user_model().objects.get(email=\"user@example.com\")\n\n\nWhen you define a foreign key or many-to-many relations to the ``EmailUser`` model, you should specify the custom model using the ``AUTH_USER_MODEL`` setting. For example:\n\n.. code-block:: python\n\n from django.conf import settings\n from django.db import models\n\n class Article(models.Model):\n author = models.ForeignKey(settings.AUTH_USER_MODEL)\n\n\nExtending EmailUser model\n-------------------------\n\nYou can easily extend ``EmailUser`` by inheriting from ``AbstractEmailUser``. For example:\n\n.. code-block:: python\n\n from custom_user.models import AbstractEmailUser\n\n class MyCustomEmailUser(AbstractEmailUser):\n \"\"\"\n Example of an EmailUser with a new field date_of_birth\n \"\"\"\n date_of_birth = models.DateField()\n\nRemember to change the ``AUTH_USER_MODEL`` setting to your new class:\n\n.. code-block:: python\n\n AUTH_USER_MODEL = 'my_app.MyCustomEmailUser'\n\nIf you use the AdminSite, add the following code to your ``my_app/admin.py`` file:\n\n.. code-block:: python\n\n from django.contrib import admin\n from custom_user.admin import EmailUserAdmin\n from .models import MyCustomEmailUser\n\n\n class MyCustomEmailUserAdmin(EmailUserAdmin):\n \"\"\"\n You can customize the interface of your model here.\n \"\"\"\n pass\n\n # Register your models here.\n admin.site.register(MyCustomEmailUser, MyCustomEmailUserAdmin)\n\n\nChangelog\n---------\n\nVersion 0.7 (2017-01-12)\n~~~~~~~~~~~~~~~~~~~~~~~~\n\n- Fixed change password link in EmailUserChangeForm (thanks to Igor Gai and rubengrill)\n\nVersion 0.6 (2016-04-03)\n~~~~~~~~~~~~~~~~~~~~~~~~\n\n- Added migrations (thanks to everybody for the help).\n\nHow to apply the migrations after upgrading:\n\nDjango 1.7\n++++++++++\n\nFor this version just run the following commands.\n\n.. code-block::\n\n python manage.py migrate custom_user 0001_initial_django17 --fake\n python manage.py migrate custom_user\n\nDjango 1.8\n++++++++++\n\nThis version didn't work without migrations, which means that your migrations will conflict with the new ones included in this version.\n\nIf you added the migrations with Django's `MIGRATION_MODULES `_ setting, delete the folder containing the migration modules and remove the setting from your config.\n\nIf you just ran ``python manage.py makemigrations``, the migrations are located inside your system's or virtualenv's ``site-packages`` folder. You can check the location running this command, and then delete the folder ``migrations`` that is inside:\n\n.. code-block::\n\n python -c \"import os; import custom_user; print(os.path.dirname(custom_user.__file__))\"\n\nYou can check if you have removed the migrations successfully running this command, you shouldn't see the section ``custom_user`` anymore:\n\n.. code-block::\n\n python manage.py migrate --list\n\nOnce the old migrations are gone, run the following command to finish:\n\n.. code-block::\n\n python manage.py migrate custom_user 0002_initial_django18 --fake\n\nVersion 0.5 (2014-09-20)\n~~~~~~~~~~~~~~~~~~~~~~~~\n\n- Django 1.7 compatible (thanks to j0hnsmith).\n- Custom application verbose_name in AdminSite with AppConfig.\n\nVersion 0.4 (2014-03-06)\n~~~~~~~~~~~~~~~~~~~~~~~~\n\n- The create_user() and create_superuser() manager methods now accept is_active and is_staff as parameters (thanks to Edil Kratskih).\n\nVersion 0.3 (2014-01-17)\n~~~~~~~~~~~~~~~~~~~~~~~~\n\n- AdminSite now works when subclassing AbstractEmailUser (thanks to Ivan Virabyan).\n- Updated model changes from Django 1.6.1.\n\nVersion 0.2 (2013-11-24)\n~~~~~~~~~~~~~~~~~~~~~~~~\n\n- Django 1.6 compatible (thanks to Simon Luijk).\n\nVersion 0.1 (2013-04-09)\n~~~~~~~~~~~~~~~~~~~~~~~~\n\n- Initial release.\n\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jcugat/django-custom-user", "keywords": "django custom user auth model email without username", "license": "BSD License", "maintainer": "", "maintainer_email": "", "name": "django-custom-user", "package_url": "https://pypi.org/project/django-custom-user/", "platform": "", "project_url": "https://pypi.org/project/django-custom-user/", "project_urls": { "Homepage": "https://github.com/jcugat/django-custom-user" }, "release_url": "https://pypi.org/project/django-custom-user/0.7/", "requires_dist": [ "Django (>=1.5)" ], "requires_python": "", "summary": "Custom user model for Django >= 1.5 with the same behaviour as Django's default User but with email instead of username.", "version": "0.7" }, "last_serial": 2570372, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "bed1a0dbcc98937bb4879e9d434e2ee6", "sha256": "dc4462f363ec56b07959cd781a119e543f3c22c28b7010c75898140aca1a547a" }, "downloads": -1, "filename": "django-custom-user-0.1.tar.gz", "has_sig": false, "md5_digest": "bed1a0dbcc98937bb4879e9d434e2ee6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7273, "upload_time": "2013-04-09T12:34:35", "url": "https://files.pythonhosted.org/packages/c5/de/239a38d70e0a2bfe429838e1dad20812afed24f2a8563049c17488e26dc4/django-custom-user-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "45f87e874b9fbbef107cbaa58ca6bb14", "sha256": "a6dd78582abfdeeaa015772b8d13af300f0ae3804fa9209ccf0ffc83724ea137" }, "downloads": -1, "filename": "django-custom-user-0.2.tar.gz", "has_sig": false, "md5_digest": "45f87e874b9fbbef107cbaa58ca6bb14", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7405, "upload_time": "2013-11-24T20:40:31", "url": "https://files.pythonhosted.org/packages/67/2f/692c075a968ec8a62067de4b570efcf994b234fbd69f1cebdea59a836b8e/django-custom-user-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "0feadf9167ec1e4bf3061b70d222f176", "sha256": "dd4d65d4b9f14be6180693dce337ac282fbcdf02481e4d75ff28e9af355436fc" }, "downloads": -1, "filename": "django_custom_user-0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0feadf9167ec1e4bf3061b70d222f176", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 10351, "upload_time": "2014-01-17T12:49:58", "url": "https://files.pythonhosted.org/packages/af/1f/8e16c7c1ad8eb7efa9f1795b6c4791c0e266dee509104617db429c2ff11f/django_custom_user-0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "db55a6eaeebdcef6761819951e0ba657", "sha256": "f42091445729229134b2b00e96f91ab54b19f853625dfb16e289555118c1bfab" }, "downloads": -1, "filename": "django-custom-user-0.3.tar.gz", "has_sig": false, "md5_digest": "db55a6eaeebdcef6761819951e0ba657", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8078, "upload_time": "2014-01-17T12:49:55", "url": "https://files.pythonhosted.org/packages/f7/66/17260c6af698a5fac5821d5dbfe887449c04f83a0005d59826feac35e85f/django-custom-user-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "6a074f9f95ffb68299af8edabdc3a1c4", "sha256": "d80286ab598354dae7ee3ec4ce27104ab80d136e84dbf24eb1092246db776f32" }, "downloads": -1, "filename": "django_custom_user-0.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6a074f9f95ffb68299af8edabdc3a1c4", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 10588, "upload_time": "2014-03-06T16:32:58", "url": "https://files.pythonhosted.org/packages/e5/bb/8cca0cd6003329b9bea31131eea0fc1960ab59aad3b3308db8e2be4e093c/django_custom_user-0.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bf4f97e7313b16a998c62336433b1e7b", "sha256": "aeb05ece7580181777effaacd361524ad38b3c97049330f5ad749a01e747b898" }, "downloads": -1, "filename": "django-custom-user-0.4.tar.gz", "has_sig": false, "md5_digest": "bf4f97e7313b16a998c62336433b1e7b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8255, "upload_time": "2014-03-06T16:32:55", "url": "https://files.pythonhosted.org/packages/5e/8f/24ce96195e513a1e5acd6c40356b7d96cd5bffd18f97e609780df5700d6c/django-custom-user-0.4.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "ab8bc41d1ab690eb3faf91a52af9d642", "sha256": "5b3f3b9245aa0f480a9177a62dace35129ff442a0d67a3ac529b3a3ae1642276" }, "downloads": -1, "filename": "django_custom_user-0.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ab8bc41d1ab690eb3faf91a52af9d642", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 13030, "upload_time": "2014-09-20T19:31:33", "url": "https://files.pythonhosted.org/packages/87/ab/7e73df9355f6da94dc2338cd75926812c94c8be0030dfe29a44492f26f1d/django_custom_user-0.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8c317a5793deebc6b49d59b08214c39f", "sha256": "2e01b3de63eff188c1c5204f7757d218b47fde97d8339ebac0c46c84d7c9c011" }, "downloads": -1, "filename": "django-custom-user-0.5.tar.gz", "has_sig": false, "md5_digest": "8c317a5793deebc6b49d59b08214c39f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10141, "upload_time": "2014-09-20T19:31:30", "url": "https://files.pythonhosted.org/packages/6b/a6/03a8418345872cde44173942433bff04cbb7493683588e2e543d7b7b7cd2/django-custom-user-0.5.tar.gz" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "4fcb151e8995b75de2472c97f912e5c0", "sha256": "a639fb7a88de1ea3f79178ce6e0f51bc422e34d0b7a75bc754351cb2717b16c9" }, "downloads": -1, "filename": "django_custom_user-0.6-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "4fcb151e8995b75de2472c97f912e5c0", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 16835, "upload_time": "2016-04-03T15:37:50", "url": "https://files.pythonhosted.org/packages/a4/44/8bb19d23d7e02994e5b86c36f7be5a674a015289033d78316f1a5eca55a9/django_custom_user-0.6-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2145ad6390e99b995c782cd326e9230f", "sha256": "93710c64d25f6ee2a1797c29e709d2511b8fb9d634f327eb50e4468c20c6cc0b" }, "downloads": -1, "filename": "django-custom-user-0.6.tar.gz", "has_sig": false, "md5_digest": "2145ad6390e99b995c782cd326e9230f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12245, "upload_time": "2016-04-03T15:38:20", "url": "https://files.pythonhosted.org/packages/cc/bd/3d461b5e906e5c5b9e211d703f544fb0034db8a6a696147717cd4433e669/django-custom-user-0.6.tar.gz" } ], "0.7": [ { "comment_text": "", "digests": { "md5": "ce454e94a1ea02dbedb81d3b2b5c9838", "sha256": "8b349657905963f521ad2b4c8a0c7c0da92733c98323d6f00cf50c1b595e88c3" }, "downloads": -1, "filename": "django_custom_user-0.7-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ce454e94a1ea02dbedb81d3b2b5c9838", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 17336, "upload_time": "2017-01-12T18:44:46", "url": "https://files.pythonhosted.org/packages/7e/62/fa30bbc8ab8a7a53cdf983a84cbf06f2fa93e103d177d39ed2218e633119/django_custom_user-0.7-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bb288f83a64976a025290f77abe7f698", "sha256": "3968acd67454746334aca940075774cb3c975284f5d1cbf96194927de426e501" }, "downloads": -1, "filename": "django-custom-user-0.7.tar.gz", "has_sig": false, "md5_digest": "bb288f83a64976a025290f77abe7f698", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12648, "upload_time": "2017-01-12T18:44:48", "url": "https://files.pythonhosted.org/packages/ec/1e/1a886178a289777419cbed937e2f53d2fb03082edbc2ac85e20504966a86/django-custom-user-0.7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ce454e94a1ea02dbedb81d3b2b5c9838", "sha256": "8b349657905963f521ad2b4c8a0c7c0da92733c98323d6f00cf50c1b595e88c3" }, "downloads": -1, "filename": "django_custom_user-0.7-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ce454e94a1ea02dbedb81d3b2b5c9838", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 17336, "upload_time": "2017-01-12T18:44:46", "url": "https://files.pythonhosted.org/packages/7e/62/fa30bbc8ab8a7a53cdf983a84cbf06f2fa93e103d177d39ed2218e633119/django_custom_user-0.7-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bb288f83a64976a025290f77abe7f698", "sha256": "3968acd67454746334aca940075774cb3c975284f5d1cbf96194927de426e501" }, "downloads": -1, "filename": "django-custom-user-0.7.tar.gz", "has_sig": false, "md5_digest": "bb288f83a64976a025290f77abe7f698", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12648, "upload_time": "2017-01-12T18:44:48", "url": "https://files.pythonhosted.org/packages/ec/1e/1a886178a289777419cbed937e2f53d2fb03082edbc2ac85e20504966a86/django-custom-user-0.7.tar.gz" } ] }