From 2559725b1e71f0c324fc4cd9827ffde16e927168 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Martin=20Sl=C3=A5en?= Date: Sat, 4 Feb 2012 11:23:46 +0100 Subject: [PATCH] Added hostname sorting in the list_display of hosts. Removed the brand column, it isn't really necessary. --- mdb/admin.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mdb/admin.py b/mdb/admin.py index 8e4d856..4b1bf7c 100644 --- a/mdb/admin.py +++ b/mdb/admin.py @@ -11,8 +11,9 @@ class InterfaceInline(admin.TabularInline): extra = 0 class HostAdmin(admin.ModelAdmin): + ordering = ('hostname',) inlines = [InterfaceInline] - list_display = ['hostname', 'brand', 'owner', 'host_type', 'location', 'mac_addresses', 'ip_addresses', 'in_domain', 'ipv6_enabled', 'created_date'] + list_display = ['hostname', 'owner', 'host_type', 'location', 'mac_addresses', 'ip_addresses', 'in_domain', 'ipv6_enabled'] readonly_fields = ['kerberos_principal_name', 'kerberos_principal_created_date', 'kerberos_principal_created'] search_fields = ['hostname', 'location', 'interface__macaddr','interface__ip4address__address']