diff options
author | Cefin <kevon@tuta.io> | 2021-10-06 10:52:01 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2022-07-08 09:58:48 +0200 |
commit | ad64bc69cdbfd3e29ec25378ee29dcae988956bc (patch) | |
tree | 4e9a081fb7ceaa39bd1592286c294b9dd620e68f /archaeological_context_records | |
parent | 17835353c0c2eb45deeaa32ffabc9c35d7b65349 (diff) | |
download | Ishtar-ad64bc69cdbfd3e29ec25378ee29dcae988956bc.tar.bz2 Ishtar-ad64bc69cdbfd3e29ec25378ee29dcae988956bc.zip |
adding excavation technique field on search
Diffstat (limited to 'archaeological_context_records')
-rw-r--r-- | archaeological_context_records/forms.py | 2 | ||||
-rw-r--r-- | archaeological_context_records/models.py | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/archaeological_context_records/forms.py b/archaeological_context_records/forms.py index 409ed0864..6d48aba4f 100644 --- a/archaeological_context_records/forms.py +++ b/archaeological_context_records/forms.py @@ -168,11 +168,13 @@ class RecordSelect(DocumentItemSelect, PeriodSelect): cr_relation_types = forms.ChoiceField( label=_("Search within relations"), choices=[] ) + excavation_technic = forms.ChoiceField(label=_("Excavation technique"), choices=[]) TYPES = PeriodSelect.TYPES + [ FieldType("unit", models.Unit), FieldType("cr_relation_types", models.RelationType), FieldType("ope_relation_types", OpeRelationType), + FieldType("excavation_technic", models.ExcavationTechnicType), ] SITE_KEYS = {"archaeological_site": None} diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py index db45418b7..aebee6d5f 100644 --- a/archaeological_context_records/models.py +++ b/archaeological_context_records/models.py @@ -542,6 +542,9 @@ class ContextRecord( pgettext_lazy("key for text search", "record-relation-type"), "cr_relation_types", ), + "excavation_technic": SearchAltName( + pgettext_lazy("key for text search", "excavation-technic"), "excavation_technic__label__iexact" + ), } ALT_NAMES.update(BaseHistorizedItem.ALT_NAMES) ALT_NAMES.update(DocumentItem.ALT_NAMES) |