From e4886af839af1194d0153c99234751d7cd4fde27 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 18 Sep 2018 11:18:11 +0200 Subject: Display pined search on search input --- archaeological_context_records/models.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'archaeological_context_records') diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py index 60f8fce1b..b0e2256a2 100644 --- a/archaeological_context_records/models.py +++ b/archaeological_context_records/models.py @@ -282,6 +282,10 @@ class ContextRecord(BulkUpdatedItem, BaseHistorizedItem, pgettext_lazy("key for text search", u"operation-code"), 'operation__operation_code' ), + 'operation__cached_label': ( + pgettext_lazy("key for text search", u"operation"), + 'operation__cached_label' + ), 'archaeological_site': ( pgettext_lazy("key for text search", u"site"), 'archaeological_site__cached_label__icontains' @@ -319,6 +323,10 @@ class ContextRecord(BulkUpdatedItem, BaseHistorizedItem, "identification__label", "activity__label", "excavation_technic__label"] M2M_SEARCH_VECTORS = ["datings__period__label"] + UP_MODEL_QUERY = { + "OPE": (pgettext_lazy("key for text search", u"operation"), + 'cached_label'), + } history = HistoricalRecords() # fields -- cgit v1.2.3