diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2022-11-02 16:03:26 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2022-12-12 12:23:19 +0100 |
commit | 49baa55756d8f6427f382c327ec7fe233b2c05d3 (patch) | |
tree | 5888b277c026e0c6e9209472f016055ba73d77c4 /archaeological_context_records | |
parent | 4ed26f54bde75a1a392b717d5306a3f59802206b (diff) | |
download | Ishtar-49baa55756d8f6427f382c327ec7fe233b2c05d3.tar.bz2 Ishtar-49baa55756d8f6427f382c327ec7fe233b2c05d3.zip |
Geodata - search: add search fields on related items searches
Diffstat (limited to 'archaeological_context_records')
-rw-r--r-- | archaeological_context_records/forms.py | 6 | ||||
-rw-r--r-- | archaeological_context_records/models.py | 1 |
2 files changed, 4 insertions, 3 deletions
diff --git a/archaeological_context_records/forms.py b/archaeological_context_records/forms.py index 8d05e50e1..27900ef80 100644 --- a/archaeological_context_records/forms.py +++ b/archaeological_context_records/forms.py @@ -52,7 +52,7 @@ from ishtar_common.forms import ( HistorySelect, MultiSearchForm, LockForm, - DocumentItemSelect, + GeoItemSelect, QAForm, ) from ishtar_common.forms_common import get_town_field @@ -133,7 +133,7 @@ class PeriodSelect(forms.Form): self.fields = fields -class RecordSelect(DocumentItemSelect, PeriodSelect): +class RecordSelect(GeoItemSelect, PeriodSelect): _model = models.ContextRecord form_admin_name = _("Context record - 001 - Search") form_slug = "contextrecord-001-search" @@ -177,7 +177,7 @@ class RecordSelect(DocumentItemSelect, PeriodSelect): FieldType("cr_relation_types", models.RelationType), FieldType("ope_relation_types", OpeRelationType), FieldType("excavation_technics", models.ExcavationTechnicType), - ] + ] + GeoItemSelect.TYPES SITE_KEYS = {"archaeological_site": None} def __init__(self, *args, **kwargs): diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py index 09733b566..da6b3b86a 100644 --- a/archaeological_context_records/models.py +++ b/archaeological_context_records/models.py @@ -631,6 +631,7 @@ class ContextRecord( ALT_NAMES.update(BaseHistorizedItem.ALT_NAMES) ALT_NAMES.update(DocumentItem.ALT_NAMES) ALT_NAMES.update(Dating.ASSOCIATED_ALT_NAMES) + ALT_NAMES.update(GeoItem.ALT_NAMES) PARENT_ONLY_SEARCH_VECTORS = ["operation", "archaeological_site", "parcel"] BASE_SEARCH_VECTORS = [ |