diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-06-05 12:59:06 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-06-12 08:54:04 +0200 |
commit | bd9e7d5d4f0eec90b0db39391e05919e4adb1342 (patch) | |
tree | ac5e2385672ca97f8123eacd219e390ec80a02ae /archaeological_context_records/models.py | |
parent | 63e4f8cea38fdde5dbc1fe582b0307ad59370f81 (diff) | |
download | Ishtar-bd9e7d5d4f0eec90b0db39391e05919e4adb1342.tar.bz2 Ishtar-bd9e7d5d4f0eec90b0db39391e05919e4adb1342.zip |
Context record towns: change column and search to point directly (not through parcel)
Diffstat (limited to 'archaeological_context_records/models.py')
-rw-r--r-- | archaeological_context_records/models.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py index 08c6f1d93..db65389f0 100644 --- a/archaeological_context_records/models.py +++ b/archaeological_context_records/models.py @@ -211,7 +211,7 @@ class ContextRecord(BulkUpdatedItem, BaseHistorizedItem, SLUG = 'contextrecord' EXTERNAL_ID_KEY = 'context_record_external_id' EXTERNAL_ID_DEPENDENCIES = ['base_finds'] - TABLE_COLS = ['label', 'operation__common_name', 'parcel__town__name', + TABLE_COLS = ['label', 'operation__common_name', 'town__name', 'parcel__short_label', 'unit'] if settings.COUNTRY == 'fr': TABLE_COLS.insert(1, 'operation__code_patriarche') @@ -224,8 +224,8 @@ class ContextRecord(BulkUpdatedItem, BaseHistorizedItem, 'operation__code_patriarche': _(u"Operation (Patriarche code)"), 'operation__common_name': _(u"Operation (name)"), 'parcel__external_id': _(u"Parcel (external ID)"), - 'parcel__town__name': _(u"Parcel (town)"), - 'parcel__town': _(u"Parcel (town)"), + 'town__name': _(u"Town"), + 'town': _(u"Town"), 'parcel__year': _(u"Parcel (year)"), 'section__parcel_number': _(u"Parcel"), } @@ -237,7 +237,7 @@ class ContextRecord(BulkUpdatedItem, BaseHistorizedItem, # search parameters EXTRA_REQUEST_KEYS = { - 'parcel__town': 'parcel__town__pk', + 'town': 'town__pk', 'parcel__short_label': 'parcel__short_label', 'operation__year': 'operation__year__contains', 'year': 'operation__year__contains', @@ -697,7 +697,7 @@ class ContextRecordSource(Source): 'comment': 'comment__icontains', 'person': 'authors__person__pk', 'additional_information': 'additional_information__icontains', - 'context_record__parcel__town': 'context_record__parcel__town__pk', + 'context_record__town': 'context_record__town__pk', 'context_record__operation__year': 'context_record__operation__year', 'context_record__operation__operation_code': 'context_record__operation__operation_code', |