from django.contrib.auth.models import User from django.contrib.auth.admin import UserAdmin from django.forms import ModelForm from django import forms class EzyUserAdminForm(ModelForm): """ Override the admin page for user to allow non-slug login names """ username = forms.CharField() class Meta: model = User class EzyUserAdmin(UserAdmin): form = EzyUserAdminForm admin.site.unregister(User) #deregister the old user admin admin.site.register(User, EzyUserAdmin) #register our new form