Add search fields and date drilldowns to various admin pages
This commit is contained in:
parent
0ab7da0463
commit
ee7c18f575
@ -14,6 +14,7 @@ class DoorAdmin(admin.ModelAdmin):
|
||||
@admin.register(HIDEvent)
|
||||
class HIDEventAdmin(DjangoObjectActions, admin.ModelAdmin):
|
||||
search_fields = ["forename", "surname", "cardholder_id"]
|
||||
date_hierarchy = "timestamp"
|
||||
list_display = ["timestamp", "door", "event_type", "description", "_is_red"]
|
||||
list_filter = [
|
||||
"timestamp",
|
||||
|
@ -71,3 +71,5 @@ class TransactionAdmin(BaseMembershipWorksAdmin):
|
||||
list_display = ["timestamp", "member", "name", "type", "sum", "note"]
|
||||
list_filter = ["type"]
|
||||
show_facets = admin.ShowFacets.ALWAYS
|
||||
search_fields = ["member", "name", "type", "note"]
|
||||
date_hierarchy = "timestamp"
|
||||
|
@ -107,6 +107,7 @@ class CertificationAdmin(admin.ModelAdmin):
|
||||
"certification_version__definition__name",
|
||||
"certification_version__definition__department__name",
|
||||
]
|
||||
date_hierarchy = "date"
|
||||
autocomplete_fields = ["member"]
|
||||
exclude = ["shop_lead_notified"]
|
||||
inlines = [CertificationAuditInline]
|
||||
|
Loading…
Reference in New Issue
Block a user