Skip to main content

Hacking Django's contrib auth app to support longer usernames

Project description

django-auth-hack

This is a Django application for hacking the builtin django.contrib.auth application. This app aims to add support to a longer username field on User model.

Installation and configuration

To install this app you need first to add it to your environment using pip:

$ [sudo] pip install django-auth-hack

Then you need to add the auth_hacks on top of your INSTALLED_APPS, before any other application:

INSTALLED_APPS = (
    'auth_hacks',
    # other apps
)

You can customize the new username max length by defining the USERNAME_MAX_LENGTH in your settings file:

USERNAME_MAX_LENGTH = 255

Database

Make sure you alter the column username in the table auth_user. You can use South or run an ALTER TABLE SQL manually. Using MySQL, you could run:

ALTER TABLE auth_user MODIFY COLUMN auth_user VARCHAR(255) NOT NULL;

Project details


Download files

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

Source Distribution

django-auth-hack-0.1.1.tar.gz (2.2 kB view details)

Uploaded Source

File details

Details for the file django-auth-hack-0.1.1.tar.gz.

File metadata

File hashes

Hashes for django-auth-hack-0.1.1.tar.gz
Algorithm Hash digest
SHA256 bba97d47cceef1a5883e8eb898e1a821c5da644239c889bce5aa2304090d6134
MD5 ef27b614ea11bd82bc16cb5e08d0e4e5
BLAKE2b-256 dd6f49fc500d54d3ea0ab9d1812fda61ceccda64246216473873155a2a4b0816

See more details on using hashes here.

Supported by

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