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_files/models.py | |
| parent | 193fbc5831e470f0eb169affa233c999f9d5f192 (diff) | |
| download | Ishtar-521b2c11e07bcd373275ddf918e523fcdac8be03.tar.bz2 Ishtar-521b2c11e07bcd373275ddf918e523fcdac8be03.zip  | |
Fix sorting on tables
Diffstat (limited to 'archaeological_files/models.py')
| -rw-r--r-- | archaeological_files/models.py | 7 | 
1 files changed, 6 insertions, 1 deletions
diff --git a/archaeological_files/models.py b/archaeological_files/models.py index a60e01f64..a4de6e0e4 100644 --- a/archaeological_files/models.py +++ b/archaeological_files/models.py @@ -87,7 +87,7 @@ class File(ClosedItem, BaseHistorizedItem, OwnPerms, ValueGetter,      SLUG = 'file'      SHOW_URL = 'show-file'      TABLE_COLS = ['numeric_reference', 'year', 'internal_reference', -                  'file_type', 'saisine_type', 'towns', ] +                  'file_type', 'saisine_type', 'towns_label', ]      # search parameters      BOOL_FIELDS = ['end_date__isnull'] @@ -109,6 +109,7 @@ class File(ClosedItem, BaseHistorizedItem, OwnPerms, ValueGetter,              'general_contractor__attached_to__pk',          'history_creator': 'history_creator__ishtaruser__person__pk',          'history_modifier': 'history_modifier__ishtaruser__person__pk', +        'towns_label': 'towns',      }      BASE_SEARCH_VECTORS = [          'name', 'internal_reference', 'file_type__label', 'saisine_type__label', @@ -122,6 +123,10 @@ class File(ClosedItem, BaseHistorizedItem, OwnPerms, ValueGetter,          'scientist'      ] +    COL_LABELS = { +        'towns_label': _(u"Towns"), +    } +      # alternative names of fields for searches      ALT_NAMES = {          'year': (  | 
