Always show admin facet counts in most models with filters
New feature in Django 5.0 Didn't enable always on HIDEvent admin, as the table size is relatively large
This commit is contained in:
parent
cacde865c0
commit
e03b9e3c70
@ -29,4 +29,5 @@ class FlagAdmin(ReadOnlyAdmin):
|
|||||||
inlines = [MemberFlagInline]
|
inlines = [MemberFlagInline]
|
||||||
list_display = ["name", "type"]
|
list_display = ["name", "type"]
|
||||||
list_filter = ["type"]
|
list_filter = ["type"]
|
||||||
|
show_facets = admin.ShowFacets.ALWAYS
|
||||||
search_fields = ["name"]
|
search_fields = ["name"]
|
||||||
|
@ -87,6 +87,7 @@ class CertificationDefinitionAdmin(admin.ModelAdmin):
|
|||||||
"latest_semantic_version",
|
"latest_semantic_version",
|
||||||
]
|
]
|
||||||
list_filter = ["department"]
|
list_filter = ["department"]
|
||||||
|
show_facets = admin.ShowFacets.ALWAYS
|
||||||
inlines = [CertificationVersionInline]
|
inlines = [CertificationVersionInline]
|
||||||
|
|
||||||
@admin.display(description="Latest Version")
|
@admin.display(description="Latest Version")
|
||||||
@ -171,6 +172,7 @@ class CertificationAdmin(admin.ModelAdmin):
|
|||||||
("shop_lead_notified", admin.EmptyFieldListFilter),
|
("shop_lead_notified", admin.EmptyFieldListFilter),
|
||||||
("audits", admin.EmptyFieldListFilter),
|
("audits", admin.EmptyFieldListFilter),
|
||||||
]
|
]
|
||||||
|
show_facets = admin.ShowFacets.ALWAYS
|
||||||
|
|
||||||
actions = ["send_notifications"]
|
actions = ["send_notifications"]
|
||||||
|
|
||||||
@ -253,6 +255,7 @@ class WaiverAdmin(admin.ModelAdmin):
|
|||||||
"waiver_version",
|
"waiver_version",
|
||||||
("audits", admin.EmptyFieldListFilter),
|
("audits", admin.EmptyFieldListFilter),
|
||||||
]
|
]
|
||||||
|
show_facets = admin.ShowFacets.ALWAYS
|
||||||
inlines = [WaiverAuditInline]
|
inlines = [WaiverAuditInline]
|
||||||
|
|
||||||
@admin.display(description="Latest Audit")
|
@admin.display(description="Latest Audit")
|
||||||
|
@ -31,6 +31,7 @@ class LockerUnitAdmin(admin.ModelAdmin):
|
|||||||
class LockerInfoAdmin(admin.ModelAdmin):
|
class LockerInfoAdmin(admin.ModelAdmin):
|
||||||
search_fields = ["renter__username", "locker_unit__bank__name"]
|
search_fields = ["renter__username", "locker_unit__bank__name"]
|
||||||
list_filter = ["locker_unit__bank", "locker_unit"]
|
list_filter = ["locker_unit__bank", "locker_unit"]
|
||||||
|
show_facets = admin.ShowFacets.ALWAYS
|
||||||
list_display = [
|
list_display = [
|
||||||
"locker_unit",
|
"locker_unit",
|
||||||
"address",
|
"address",
|
||||||
|
Loading…
Reference in New Issue
Block a user