I want to modify a few tiny details of Django\'s built-in django.contrib.auth
module. Specifically, I want a different form that makes username an email field
None of the above. Just use admin.site.unregister(). Here's how I recently added filtering Users on is_active in the admin (n.b. is_active filtering is now on the User model by default in Django core; still works here as an example), all DRY as can be:
from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from django.contrib.auth.models import User
class MyUserAdmin(UserAdmin):
list_filter = UserAdmin.list_filter + ('is_active',)
admin.site.unregister(User)
admin.site.register(User, MyUserAdmin)
I think it might be easier to do this with a custom auth backend and thus remove the need for a customized ModelAdmin.
I did something similar with this snippet: http://www.djangosnippets.org/snippets/74/