membershipworks: Add event instructor name to EventInvoice list_display
This commit is contained in:
parent
229558116b
commit
b1d3f16459
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user