From 229558116b014451bb9b1c6aaa4d2f94320e2833 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Fri, 24 May 2024 11:30:34 -0400 Subject: [PATCH] membershipworks: Add event start/end to EventInvoice list_display --- membershipworks/admin.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/membershipworks/admin.py b/membershipworks/admin.py index ac11a26..7fa5af1 100644 --- a/membershipworks/admin.py +++ b/membershipworks/admin.py @@ -121,6 +121,8 @@ class EventInvoiceAdmin(admin.ModelAdmin): list_display = [ "uuid", "event", + "_event_start", + "_event_end", "date_submitted", "date_paid", "amount", @@ -139,6 +141,14 @@ class EventInvoiceAdmin(admin.ModelAdmin): ] date_hierarchy = "date_submitted" + @admin.display(ordering="event__start") + def _event_start(self, obj): + return obj.event.start + + @admin.display(ordering="event__end") + def _event_end(self, obj): + return obj.event.end + class EventInvoiceInline(admin.StackedInline): model = EventInvoice