diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2024-09-23 15:24:16 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2024-09-26 11:25:21 +0200 |
commit | defd93897c0999cacf72bcc992551c49b7cbde22 (patch) | |
tree | ea45579ae805c742de123a5e20f035eb3c5a3875 /archaeological_context_records/models.py | |
parent | 440038531ae041a4800b11921197616c34f577f2 (diff) | |
download | Ishtar-defd93897c0999cacf72bcc992551c49b7cbde22.tar.bz2 Ishtar-defd93897c0999cacf72bcc992551c49b7cbde22.zip |
Context record: DocumentationType, ExcavationTechnic add hierarchy and order
Diffstat (limited to 'archaeological_context_records/models.py')
-rw-r--r-- | archaeological_context_records/models.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py index efef8cce0..90f961c0a 100644 --- a/archaeological_context_records/models.py +++ b/archaeological_context_records/models.py @@ -404,22 +404,22 @@ post_save.connect(post_save_cache, sender=InclusionType) post_delete.connect(post_save_cache, sender=InclusionType) -class ExcavationTechnicType(GeneralType): +class ExcavationTechnicType(OrderedHierarchicalType): class Meta: verbose_name = _("Excavation technique type") verbose_name_plural = _("Excavation technique types") - ordering = ("label",) + ordering = ("order", "label") post_save.connect(post_save_cache, sender=ExcavationTechnicType) post_delete.connect(post_save_cache, sender=ExcavationTechnicType) -class DocumentationType(GeneralType): +class DocumentationType(OrderedHierarchicalType): class Meta: verbose_name = _("Documentation type") verbose_name_plural = _("Documentation types") - ordering = ("label",) + ordering = ("order", "label") post_save.connect(post_save_cache, sender=DocumentationType) |