Skip to content

jivid/django-custom-user

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

django-custom-user

A custom user model integrated with the default Django authentication backend. This is based on the feature added in Django 1.5, which allows you to create a custom user model to replace contrib.auth.models.User. The only pre-requisite for this is Django 1.5; if you have an older version and want to upgrade, look here.

The CustomUser model isn't made to be too different from the default User. The biggest change is the absence of a 'username' field, and the 'email' being used as the unique identifier. The rest ofthe code demonstrates how to use the custom model with existing authentication resources:

django.contrib.auth.forms.AuthenticationForm - basic login form provided by Django

django.contrib.auth.login,authenticate - pre-defined methods to login and authenticate a user

See the Django docs for more info on customizing contrib.auth

About

A custom user model integrated with the default Django authentication backend.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages