From 3f05d499e479b72486e33ff0b48ae4febf91dac3 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 23 Feb 2023 18:09:15 +0100 Subject: Admin: overload index to add sub-section headers --- archaeological_finds/models_treatments.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'archaeological_finds/models_treatments.py') diff --git a/archaeological_finds/models_treatments.py b/archaeological_finds/models_treatments.py index 88f267a9b..2ee23c1c6 100644 --- a/archaeological_finds/models_treatments.py +++ b/archaeological_finds/models_treatments.py @@ -71,6 +71,7 @@ class TreatmentState(GeneralType): "order", "label", ) + ADMIN_SECTION = _("Treatments") @classmethod def get_default(cls): @@ -298,6 +299,7 @@ class Treatment( indexes = [ GinIndex(fields=["data"]), ] + ADMIN_SECTION = _("Treatments") def __str__(self): return self.cached_label or "" @@ -1000,6 +1002,7 @@ class TreatmentFileType(GeneralType): verbose_name = _("Treatment request type") verbose_name_plural = _("Treatment request types") ordering = ("label",) + ADMIN_SECTION = _("Treatments") post_save.connect(post_save_cache, sender=TreatmentFileType) @@ -1187,6 +1190,7 @@ class TreatmentFile( indexes = [ GinIndex(fields=["data"]), ] + ADMIN_SECTION = _("Treatments") def __str__(self): return self.cached_label or "" -- cgit v1.2.3