From ef77c8faed6f5cc1720e6dbef79ba614899ed8f6 Mon Sep 17 00:00:00 2001 From: Michael Hall Date: Sat, 10 Mar 2018 23:19:44 -0800 Subject: [PATCH] Sort Event admin by start_time, descending --- events/admin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/events/admin.py b/events/admin.py index b5416c8..400fd89 100644 --- a/events/admin.py +++ b/events/admin.py @@ -52,8 +52,8 @@ admin.site.register(Place, PlaceAdmin) class EventAdmin(admin.ModelAdmin): raw_id_fields = ('place', 'created_by') - list_display = ('__str__', 'attendee_count', 'created_by', 'created_time') - ordering = ('-created_time',) + list_display = ('__str__', 'attendee_count', 'start_time', 'created_by', 'created_time') + ordering = ('-start_time',) def attendee_count(self, event): return event.attendees.all().count() attendee_count.short_description = 'Attendees'