Metadata-Version: 2.0
Name: django-improved-user
Version: 0.1.1
Summary: A custom Django user model for best practices email-based login.
Home-page: https://github.com/jambonsw/django-improved-user/
Author: Russell Keith-Magee <russell at keith-magee dot com>, Andrew Pinkham <hello at andrewsforge dot com>
Author-email: UNKNOWN
License: Simplified BSD License
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Software Development
Classifier: Topic :: Utilities
Requires-Dist: django (>=1.8)

Read Me
=======

This project provides a custom user model that improves on Django's
default by making a few modern and international changes.

* Uses email as the username to simplify login for users
* Replace ``first_name`` and ``last_name`` with international friendly
  ``short_name`` ``full name`` fields

Usage
-----

Perform the following steps in your ``settings.py`` file.

1. Add ``improved_user`` to ``INSTALLED_APPS``
2. Define or replace ``AUTH_USER_MODEL`` with he new model, as below.

.. code:: python

    AUTH_USER_MODEL='improved_user.User'

3. In Django > 1.9, change ``UserAttributeSimilarityValidator`` to match
   correct ``User`` fields, as shown below.

.. code:: python

    AUTH_PREFIX = 'django.contrib.auth.password_validation.'
    AUTH_PASSWORD_VALIDATORS = [
        {
            'NAME': AUTH_PREFIX + 'UserAttributeSimilarityValidator',
            'OPTIONS': {
                'user_attributes': ('email', 'full_name', 'short_name')
            },
        },
        # include other password validators here
    ]

Testing
-------

>From the root directory of the project, run the code below.

.. code:: console

    $ python runtests.py


