From 811e683a0d9d1a42326bb1e02d51602dc8bd8156 Mon Sep 17 00:00:00 2001 From: Michael Ziegler Date: Thu, 11 Feb 2010 17:09:32 +0100 Subject: [PATCH] display the content of aclAdmin instead of isAdmin in the admin list view. --- pyweb/mumble/admin.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pyweb/mumble/admin.py b/pyweb/mumble/admin.py index 693e3c5..4f29186 100644 --- a/pyweb/mumble/admin.py +++ b/pyweb/mumble/admin.py @@ -77,10 +77,16 @@ class MumbleAdmin(admin.ModelAdmin): class MumbleUserAdmin(admin.ModelAdmin): """ Specification for the "Registered users" admin section. """ - list_display = [ 'owner', 'server', 'name', 'isAdmin' ]; + list_display = [ 'owner', 'server', 'name', 'get_acl_admin' ]; list_filter = [ 'server' ]; search_fields = [ 'owner__username', 'name' ]; ordering = [ 'owner__username' ]; + + def get_acl_admin( self, obj ): + return obj.aclAdmin + + get_acl_admin.short_description = _('Admin on root channel') + get_acl_admin.boolean = True admin.site.register( Mumble, MumbleAdmin );