Skip to main content

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.

AUTH_USER_MODEL='improved_user.User'
  1. In Django > 1.9, change UserAttributeSimilarityValidator to match correct User fields, as shown below.

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.

$ python runtests.py

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-improved-user-0.1.1.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_improved_user-0.1.1-py3-none-any.whl (14.5 kB view details)

Uploaded Python 3

File details

Details for the file django-improved-user-0.1.1.tar.gz.

File metadata

File hashes

Hashes for django-improved-user-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c80af25e59e5903cb008a424fe4b1142b76ea17bed64c0011d79492e2d00314a
MD5 9bfa8314225bb24cd853e023390d63c1
BLAKE2b-256 1467e85a989fcc0e8a92b9281a5d8b70facd88ee2793c085b5cbbfe5a98b622a

See more details on using hashes here.

File details

Details for the file django_improved_user-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for django_improved_user-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4eebe3ead4df7e4ba2d3ddf103acefad825564fce8f074f4e1768fab1d34d13d
MD5 7443edf1ec89476fecd827803c283cc6
BLAKE2b-256 69137151846f50ee41f6cb5e72c778dfa695548cedf9d0ad5cba0c92e0ebcbb5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page