membershipworks: Add event start/end to EventInvoice list_display
This commit is contained in:
parent
26420ce28e
commit
229558116b
@ -121,6 +121,8 @@ class EventInvoiceAdmin(admin.ModelAdmin):
|
|||||||
list_display = [
|
list_display = [
|
||||||
"uuid",
|
"uuid",
|
||||||
"event",
|
"event",
|
||||||
|
"_event_start",
|
||||||
|
"_event_end",
|
||||||
"date_submitted",
|
"date_submitted",
|
||||||
"date_paid",
|
"date_paid",
|
||||||
"amount",
|
"amount",
|
||||||
@ -139,6 +141,14 @@ class EventInvoiceAdmin(admin.ModelAdmin):
|
|||||||
]
|
]
|
||||||
date_hierarchy = "date_submitted"
|
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):
|
class EventInvoiceInline(admin.StackedInline):
|
||||||
model = EventInvoice
|
model = EventInvoice
|
||||||
|
Loading…
Reference in New Issue
Block a user