From b1d3f164591d25e1d19ecaa78020560bf79fa0b9 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Fri, 24 May 2024 11:38:05 -0400 Subject: [PATCH] membershipworks: Add event instructor name to EventInvoice list_display --- membershipworks/admin.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/membershipworks/admin.py b/membershipworks/admin.py index 7fa5af1..da1253e 100644 --- a/membershipworks/admin.py +++ b/membershipworks/admin.py @@ -123,6 +123,7 @@ class EventInvoiceAdmin(admin.ModelAdmin): "event", "_event_start", "_event_end", + "_event_instructor", "date_submitted", "date_paid", "amount", @@ -141,6 +142,10 @@ class EventInvoiceAdmin(admin.ModelAdmin): ] date_hierarchy = "date_submitted" + @admin.display(ordering="event__instructor") + def _event_instructor(self, obj): + return obj.event.instructor + @admin.display(ordering="event__start") def _event_start(self, obj): return obj.event.start