So, I wanted one of those horizontal multi-selects with “available” and “chosen” boxes to associate users with groups in the Django auth admin UI. Turns out it all I had to do was import the UserAdmin class from django.contrib.auth.admin and override the filter_horizontal attribute:
from django.contrib.auth.admin import UserAdmin UserAdmin.filter_horizontal = ('user_permissions', 'groups')
Since importing the UserAdmin class runs the admin module from django.contrib.auth, the UserAdmin and GroupAdmin classes are registered for the admin site. All I have to do then is import my custom admin module in my URLconf instead of the one from django.contrib.auth to make sure my customizations are applied in my admin site.
As discovered by a commenter, there are some admin attributes which can’t be overridden as simply as shown above. However, you can first unregister the model with the admin site (this method is not publicly documented), override, then re-register the model:
from django.contrib import admin from django.contrib.auth.admin import UserAdmin from django.contrib.auth.models import User admin.site.unregister(User) class CustomUserAdmin(UserAdmin): filter_horizontal = ('user_permissions', 'groups') save_on_top = True list_display = ('username', 'email', 'first_name', 'last_name', 'is_staff', 'last_login') admin.site.register(User, CustomUserAdmin)