summaryrefslogtreecommitdiff
path: root/archaeological_finds/models_finds.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2018-09-18 11:18:11 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2018-10-24 12:06:08 +0200
commitd33cf24f1bdf116cb81aeb45804593058d9ebbdb (patch)
treed0bd953ebe547522206cb9a01ebe1b33dcaa89c4 /archaeological_finds/models_finds.py
parent985dfb92cbadf5f8fce43dfcd08fb44c3b2165f3 (diff)
downloadIshtar-d33cf24f1bdf116cb81aeb45804593058d9ebbdb.tar.bz2
Ishtar-d33cf24f1bdf116cb81aeb45804593058d9ebbdb.zip
Display pined search on search input
Diffstat (limited to 'archaeological_finds/models_finds.py')
-rw-r--r--archaeological_finds/models_finds.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py
index 3c44e0be4..fb7a8802a 100644
--- a/archaeological_finds/models_finds.py
+++ b/archaeological_finds/models_finds.py
@@ -858,6 +858,10 @@ class Find(BulkUpdatedItem, ValueGetter, BaseHistorizedItem, OwnPerms,
'basket': (
pgettext_lazy("key for text search", u"basket"),
'basket__label__exact'
+ ),
+ 'base_finds__context_record__operation__cached_label': (
+ pgettext_lazy("key for text search", u"operation"),
+ 'base_finds__context_record__operation__cached_label__icontains'
),
}
for v in ALT_NAMES.values():
@@ -895,6 +899,12 @@ class Find(BulkUpdatedItem, ValueGetter, BaseHistorizedItem, OwnPerms,
module='warehouse'
),
]
+ UP_MODEL_QUERY = {
+ "OPE": (pgettext_lazy("key for text search", u"operation"),
+ 'cached_label'),
+ "UE": (pgettext_lazy("key for text search", u"context-record"),
+ 'cached_label'),
+ }
# fields
base_finds = models.ManyToManyField(BaseFind, verbose_name=_(u"Base find"),