Browse Source

display the content of aclAdmin instead of isAdmin in the admin list view.

Natenom/support-murmur-13-1446181288462
Michael Ziegler 15 years ago
parent
commit
811e683a0d
  1. 8
      pyweb/mumble/admin.py

8
pyweb/mumble/admin.py

@ -77,11 +77,17 @@ 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 );
admin.site.register( MumbleUser, MumbleUserAdmin );
Loading…
Cancel
Save