summaryrefslogtreecommitdiff
path: root/archaeological_operations/models.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2026-04-01 15:59:39 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2026-04-02 13:30:50 +0200
commit4d8f427560a336d24c158d34b7500a75c454134d (patch)
tree5f5351d0c0ff3f0394239d1d4a56c372f5771d44 /archaeological_operations/models.py
parent205ad98138447af4b86cd11d38c3c382ea1656cd (diff)
downloadIshtar-4d8f427560a336d24c158d34b7500a75c454134d.tar.bz2
Ishtar-4d8f427560a336d24c158d34b7500a75c454134d.zip
✨ sites - search: add heritage and datings fields
Diffstat (limited to 'archaeological_operations/models.py')
-rw-r--r--archaeological_operations/models.py41
1 files changed, 37 insertions, 4 deletions
diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py
index 7bf654639..c34478b6c 100644
--- a/archaeological_operations/models.py
+++ b/archaeological_operations/models.py
@@ -475,8 +475,8 @@ class ArchaeologicalSite(
"heritage_environmental_protections"
]
- DATED_FIELDS = BaseHistorizedItem.DATED_FIELDS + ["sinking_date"]
- NUMBER_FIELDS = GeographicTownItem.NUMBER_FIELDS[:]
+ DATED_FIELDS = BaseHistorizedItem.DATED_FIELDS + ["sinking_date", "protection_date"]
+ NUMBER_FIELDS = GeographicTownItem.NUMBER_FIELDS[:] + BaseDating.NUMBER_FIELDS
EXTRA_REQUEST_KEYS = {
"towns_label": "towns",
@@ -516,9 +516,41 @@ class ArchaeologicalSite(
pgettext_lazy("key for text search", "discovery-status"),
"discovery_status__label__iexact"
),
- "current_status": SearchAltName(
+ "current_states": SearchAltName(
pgettext_lazy("key for text search", "current-status"),
- "current_status__label__iexact"
+ "current_states__label__iexact"
+ ),
+ "actors": SearchAltName(
+ pgettext_lazy("key for text search", "actors"),
+ "actors__cached_label__iexact"
+ ),
+ "collaborators": SearchAltName(
+ pgettext_lazy("key for text search", "collaborators"),
+ "collaborators__cached_label__iexact"
+ ),
+ "editors": SearchAltName(
+ pgettext_lazy("key for text search", "editor"),
+ "editors__cached_label__iexact"
+ ),
+ "protection_id": SearchAltName(
+ pgettext_lazy("key for text search", "protection-id"),
+ "protection_id__iexact"
+ ),
+ "protection_date": SearchAltName(
+ pgettext_lazy("key for text search", "protection-date"),
+ "protection_date"
+ ),
+ "details_on_protection": SearchAltName(
+ pgettext_lazy("key for text search", "protection-details"),
+ "details_on_protection__iexact"
+ ),
+ "heritage_interest": SearchAltName(
+ pgettext_lazy("key for text search", "heritage-interest"),
+ "heritage_interests__label__iexact"
+ ),
+ "heritage_environmental_protections": SearchAltName(
+ pgettext_lazy("key for text search", "heritage-environmental-protection"),
+ "heritage_environmental_protections__label__iexact"
),
"nature_of_site": SearchAltName(
pgettext_lazy("key for text search", "nature"),
@@ -606,6 +638,7 @@ class ArchaeologicalSite(
ALT_NAMES.update(DocumentItem.ALT_NAMES)
ALT_NAMES.update(GeoItem.ALT_NAMES)
ALT_NAMES.update(Imported.ALT_NAMES)
+ ALT_NAMES.update(BaseDating.ALT_NAMES)
DEFAULT_SEARCH_FORM = ("archaeological_operations.forms", "SiteSelect")