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 | fab4d28bed4ec75e2efa6527503f3a5ca466534c (patch) | |
| tree | 01493b511c1b598a41c2ca4dd6630e25124a1e4b /archaeological_context_records/models.py | |
| parent | 574a5347872a8222d769d740e40bb74a6c13b967 (diff) | |
| download | Ishtar-fab4d28bed4ec75e2efa6527503f3a5ca466534c.tar.bz2 Ishtar-fab4d28bed4ec75e2efa6527503f3a5ca466534c.zip  | |
Fix sorting on tables
Diffstat (limited to 'archaeological_context_records/models.py')
| -rw-r--r-- | archaeological_context_records/models.py | 7 | 
1 files changed, 5 insertions, 2 deletions
diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py index 6061ad09c..080fa54da 100644 --- a/archaeological_context_records/models.py +++ b/archaeological_context_records/models.py @@ -213,7 +213,7 @@ class ContextRecord(BulkUpdatedItem, BaseHistorizedItem,      EXTERNAL_ID_KEY = 'context_record_external_id'      EXTERNAL_ID_DEPENDENCIES = ['base_finds']      TABLE_COLS = ['label', 'operation__common_name', 'town__name', -                  'parcel__short_label', 'unit'] +                  'parcel__cached_label', 'unit']      if settings.COUNTRY == 'fr':          TABLE_COLS.insert(1, 'operation__code_patriarche')      TABLE_COLS_FOR_OPE = ['label', 'parcel', 'unit', @@ -229,6 +229,7 @@ class ContextRecord(BulkUpdatedItem, BaseHistorizedItem,          'town': _(u"Town"),          'parcel__year': _(u"Parcel (year)"),          'section__parcel_number': _(u"Parcel"), +        'parcel__cached_label': _(u"Parcel"),      }      CONTEXTUAL_TABLE_COLS = {          'full': { @@ -239,11 +240,13 @@ class ContextRecord(BulkUpdatedItem, BaseHistorizedItem,      # search parameters      EXTRA_REQUEST_KEYS = {          'town': 'town__pk', -        'parcel__short_label': 'parcel__short_label', +        'town__name': 'town__name', +        'parcel__cached_label': 'parcel__cached_label',          'operation__year': 'operation__year__contains',          'year': 'operation__year__contains',          'operation__code_patriarche': 'operation__code_patriarche',          'operation__operation_code': 'operation__operation_code', +        'operation__common_name': 'operation__common_name',          'datings__period': 'datings__period__pk',          'parcel_0': 'operation__parcels__section',          'parcel_1': 'operation__parcels__parcel_number',  | 
