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",
|
||||||
"_event_start",
|
"_event_start",
|
||||||
"_event_end",
|
"_event_end",
|
||||||
|
"_event_instructor",
|
||||||
"date_submitted",
|
"date_submitted",
|
||||||
"date_paid",
|
"date_paid",
|
||||||
"amount",
|
"amount",
|
||||||
@ -141,6 +142,10 @@ class EventInvoiceAdmin(admin.ModelAdmin):
|
|||||||
]
|
]
|
||||||
date_hierarchy = "date_submitted"
|
date_hierarchy = "date_submitted"
|
||||||
|
|
||||||
|
@admin.display(ordering="event__instructor")
|
||||||
|
def _event_instructor(self, obj):
|
||||||
|
return obj.event.instructor
|
||||||
|
|
||||||
@admin.display(ordering="event__start")
|
@admin.display(ordering="event__start")
|
||||||
def _event_start(self, obj):
|
def _event_start(self, obj):
|
||||||
return obj.event.start
|
return obj.event.start
|
||||||
|
Loading…
Reference in New Issue
Block a user