Browse Source

update admin stuff to use the `booted' property

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

12
pyweb/mumble/admin.py

@ -23,14 +23,20 @@ from mumble.models import Mumble, MumbleUser
class MumbleAdmin(admin.ModelAdmin):
""" Specification for the "Server administration" admin section. """
list_display = [ 'name', 'addr', 'port', 'booted', 'get_is_public',
list_display = [ 'name', 'addr', 'port', 'get_booted', 'get_is_public',
'get_users_regged', 'get_users_online', 'get_channel_count' ];
list_filter = [ 'booted', 'addr' ];
search_fields = [ 'name', 'addr' ];
list_filter = [ 'addr' ];
search_fields = [ 'name', 'addr', 'port' ];
ordering = [ 'name' ];
form = MumbleAdminForm;
def get_booted( self, obj ):
return obj.booted
get_booted.short_description = _('Boot Server')
get_booted.boolean = True
def get_users_regged( self, obj ):
""" Populates the "Registered users" column. """
if obj.booted:

Loading…
Cancel
Save