From eb78c594001a72d2804ebfbfdd3ddadd02db52d1 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 29 Jun 2026 13:18:36 +0200 Subject: ✨ sites - forms: "other names" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- archaeological_operations/forms.py | 3 +++ archaeological_operations/models.py | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py index 8da0cca85..b52496f81 100644 --- a/archaeological_operations/forms.py +++ b/archaeological_operations/forms.py @@ -1116,6 +1116,7 @@ class ArchaeologicalSiteForm(ManageOldType): HEADERS = {} reference = forms.CharField(label=_("Reference"), max_length=200) name = forms.CharField(label=_("Name"), max_length=200, required=False) + other_names = forms.CharField(label=_("Other names"), required=False) other_reference = forms.CharField(label=_("Other reference"), required=False) periods = forms.MultipleChoiceField( @@ -1214,6 +1215,7 @@ class SiteSelect(GeoItemSelect, DatingSelect): reference = forms.CharField(label=_("Reference"), max_length=200, required=False) name = forms.CharField(label=_("Name"), max_length=200, required=False) + other_names = forms.CharField(label=_("Other names"), required=False) other_reference = forms.CharField(label=_("Other reference"), max_length=200, required=False) types = widgets.Select2SimpleField(label=_("Types"), required=False, @@ -1398,6 +1400,7 @@ class SiteForm(CustomForm, ManageOldType): other_reference = forms.CharField(label=_("Other reference"), required=False) name = forms.CharField(label=_("Name"), max_length=200, required=False) + other_names = forms.CharField(label=_("Other names"), required=False) heritage_interest = forms.MultipleChoiceField( label=_("Heritage interest"), choices=[], widget=widgets.Select2Multiple, required=False) diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index e94b97cf8..e63299285 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -447,6 +447,7 @@ class ArchaeologicalSite( SearchVectorConfig("locality_cadastral", "local"), SearchVectorConfig("locality_ngi", "local"), SearchVectorConfig("name", "raw"), + SearchVectorConfig("other_names", "raw"), SearchVectorConfig("oceanographic_service_localisation"), SearchVectorConfig("reference", "raw"), SearchVectorConfig("other_reference", "raw"), @@ -506,6 +507,9 @@ class ArchaeologicalSite( "name": SearchAltName( pgettext_lazy("key for text search", "name"), "name__iexact" ), + "other_names": SearchAltName( + pgettext_lazy("key for text search", "other-names"), "other_names__iexact" + ), "other_reference": SearchAltName( pgettext_lazy("key for text search", "other-reference"), "other_reference__iexact", -- cgit v1.2.3