diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-08-20 18:42:36 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-08-20 18:42:36 +0200 |
commit | 521b2c11e07bcd373275ddf918e523fcdac8be03 (patch) | |
tree | 01493b511c1b598a41c2ca4dd6630e25124a1e4b /archaeological_finds/models_treatments.py | |
parent | 193fbc5831e470f0eb169affa233c999f9d5f192 (diff) | |
download | Ishtar-521b2c11e07bcd373275ddf918e523fcdac8be03.tar.bz2 Ishtar-521b2c11e07bcd373275ddf918e523fcdac8be03.zip |
Fix sorting on tables
Diffstat (limited to 'archaeological_finds/models_treatments.py')
-rw-r--r-- | archaeological_finds/models_treatments.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/archaeological_finds/models_treatments.py b/archaeological_finds/models_treatments.py index cd52791e7..5506afae0 100644 --- a/archaeological_finds/models_treatments.py +++ b/archaeological_finds/models_treatments.py @@ -54,19 +54,21 @@ class Treatment(DashboardFormItem, ValueGetter, BaseHistorizedItem, SHOW_URL = 'show-treatment' TABLE_COLS = ('year', 'index', 'treatment_types__label', 'treatment_state__label', - 'label', 'person', + 'label', 'person__cached_label', 'start_date', 'downstream_cached_label', 'upstream_cached_label') REVERSED_BOOL_FIELDS = ['documents__image__isnull'] EXTRA_REQUEST_KEYS = { "downstream_cached_label": "downstream__cached_label", "upstream_cached_label": "upstream__cached_label", + 'person__cached_label': 'person__cached_label', } COL_LABELS = { "downstream_cached_label": _(u"Downstream find"), "upstream_cached_label": _(u"Upstream find"), "treatment_types__label": _(u"Type"), "treatment_state__label": _(u"State"), + 'person__cached_label': _(u"Responsible"), } # extra keys than can be passed to save method EXTRA_SAVED_KEYS = ('items', 'user') |