mirror of
https://github.com/django/django.git
synced 2025-11-07 07:15:35 +00:00
Added 'groups' to UserAdmin.filter_horizontal
Is there some reason it's not there already? Our list of groups is very cumbersome to use with the standard widget.
This commit is contained in:
committed by
Luke Plant
parent
fa2e28ccc4
commit
cc83a4af0c
@@ -56,7 +56,7 @@ class UserAdmin(admin.ModelAdmin):
|
|||||||
list_filter = ('is_staff', 'is_superuser', 'is_active', 'groups')
|
list_filter = ('is_staff', 'is_superuser', 'is_active', 'groups')
|
||||||
search_fields = ('username', 'first_name', 'last_name', 'email')
|
search_fields = ('username', 'first_name', 'last_name', 'email')
|
||||||
ordering = ('username',)
|
ordering = ('username',)
|
||||||
filter_horizontal = ('user_permissions',)
|
filter_horizontal = ('groups', 'user_permissions',)
|
||||||
|
|
||||||
def get_fieldsets(self, request, obj=None):
|
def get_fieldsets(self, request, obj=None):
|
||||||
if not obj:
|
if not obj:
|
||||||
|
|||||||
Reference in New Issue
Block a user