summaryrefslogtreecommitdiff
path: root/archaeological_context_records
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2018-10-01 15:10:07 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2018-10-24 12:06:08 +0200
commite55d8d335b682f86439457c577c95b1768543f22 (patch)
tree8d6e00ce0a1a19b41869b6b6b2ebc5afbb133b64 /archaeological_context_records
parent179b51b530687a6d81c1434d13d12c02afe7abff (diff)
downloadIshtar-e55d8d335b682f86439457c577c95b1768543f22.tar.bz2
Ishtar-e55d8d335b682f86439457c577c95b1768543f22.zip
Manage site and warehouse in shortcut menu - Many fixes on pin
Diffstat (limited to 'archaeological_context_records')
-rw-r--r--archaeological_context_records/models.py19
1 files changed, 13 insertions, 6 deletions
diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py
index b0e2256a2..ec79748c7 100644
--- a/archaeological_context_records/models.py
+++ b/archaeological_context_records/models.py
@@ -257,9 +257,6 @@ class ContextRecord(BulkUpdatedItem, BaseHistorizedItem,
}
RELATION_TYPES_PREFIX = {'ope_relation_types': 'operation__',
'cr_relation_types': ''}
- RELATIVE_SESSION_NAMES = [
- ('operation', 'operation__pk'),
- ('file', 'operation__associated_file__pk')]
# alternative names of fields for searches
ALT_NAMES = {
'label': (
@@ -284,7 +281,7 @@ class ContextRecord(BulkUpdatedItem, BaseHistorizedItem,
),
'operation__cached_label': (
pgettext_lazy("key for text search", u"operation"),
- 'operation__cached_label'
+ 'operation__cached_label__icontains'
),
'archaeological_site': (
pgettext_lazy("key for text search", u"site"),
@@ -324,9 +321,19 @@ class ContextRecord(BulkUpdatedItem, BaseHistorizedItem,
"excavation_technic__label"]
M2M_SEARCH_VECTORS = ["datings__period__label"]
UP_MODEL_QUERY = {
- "OPE": (pgettext_lazy("key for text search", u"operation"),
- 'cached_label'),
+ "operation": (
+ pgettext_lazy("key for text search", u"operation"),
+ 'cached_label'),
+ "site": (
+ pgettext_lazy("key for text search", u"site"),
+ 'cached_label'),
}
+ RELATIVE_SESSION_NAMES = [
+ ('operation', 'operation__pk'),
+ ('site', 'archaeological_site__pk'),
+ ('file', 'operation__associated_file__pk'),
+ ]
+
history = HistoricalRecords()
# fields