diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-10-17 17:33:30 +0200 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-10-24 12:06:09 +0200 |
| commit | 12677a8856f7503e908d965ca2034c6afccda838 (patch) | |
| tree | c8c33449dc1ad25f195839068fa1fdd6125931ec /archaeological_finds/models_finds.py | |
| parent | dddba4f6f64680a047d99292f8acf65ae57238cf (diff) | |
| download | Ishtar-12677a8856f7503e908d965ca2034c6afccda838.tar.bz2 Ishtar-12677a8856f7503e908d965ca2034c6afccda838.zip | |
Find: search last modified and modified by
Diffstat (limited to 'archaeological_finds/models_finds.py')
| -rw-r--r-- | archaeological_finds/models_finds.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py index 26993aa32..3a1d44f36 100644 --- a/archaeological_finds/models_finds.py +++ b/archaeological_finds/models_finds.py @@ -680,6 +680,8 @@ class Find(BulkUpdatedItem, ValueGetter, BaseHistorizedItem, OwnPerms, 'cr_relation_types': 'base_finds__context_record__', } + + DATED_FIELDS = ['last_modified__gte'] BASE_REQUEST = {'downstream_treatment__isnull': True} EXTRA_REQUEST_KEYS = { 'base_finds__context_record': @@ -860,6 +862,15 @@ class Find(BulkUpdatedItem, ValueGetter, BaseHistorizedItem, OwnPerms, pgettext_lazy("key for text search", u"operation"), 'base_finds__context_record__operation__cached_label__icontains' ), + 'history_modifier': ( + pgettext_lazy("key for text search", u"last-modified-by"), + 'history_modifier__ishtaruser__person__cached_label__icontains' + ), + 'modified_since': ( + pgettext_lazy("key for text search", u"modified-since"), + 'last_modified__gte' + + ), } for v in ALT_NAMES.values(): for language_code, language_lbl in settings.LANGUAGES: |
