From e4c0173adc1250fe608f477bb80cbdc5bddc3885 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 14 Nov 2016 19:43:27 +0100 Subject: Explicit CSV headers (refs #3340) --- archaeological_context_records/models.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'archaeological_context_records/models.py') diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py index 3f4dc1598..22ff3b095 100644 --- a/archaeological_context_records/models.py +++ b/archaeological_context_records/models.py @@ -29,7 +29,7 @@ from ishtar_common.utils import cached_label_changed from ishtar_common.models import GeneralType, BaseHistorizedItem, \ HistoricalRecords, OwnPerms, ShortMenuItem, Source, GeneralRelationType,\ GeneralRecordRelations, post_delete_record_relation, get_external_id, \ - ImageModel, post_save_cache + ImageModel, post_save_cache, ValueGetter from archaeological_operations.models import Operation, Period, Parcel @@ -118,7 +118,8 @@ post_save.connect(post_save_cache, sender=IdentificationType) post_delete.connect(post_save_cache, sender=IdentificationType) -class ContextRecord(BaseHistorizedItem, ImageModel, OwnPerms, ShortMenuItem): +class ContextRecord(BaseHistorizedItem, ImageModel, OwnPerms, + ValueGetter, ShortMenuItem): SHOW_URL = 'show-contextrecord' SLUG = 'contextrecord' TABLE_COLS = ['parcel__town', 'operation__year', @@ -155,6 +156,14 @@ class ContextRecord(BaseHistorizedItem, ImageModel, OwnPerms, ShortMenuItem): RELATIVE_SESSION_NAMES = [ ('operation', 'operation__pk'), ('file', 'operation__associated_file__pk')] + EXTRA_FULL_FIELDS_LABELS = { + 'parcel__town': _(u"Parcel (town)"), + 'detailled_related_context_records': _(u"Related context records"), + 'operation__code_patriarche': u"Operation (code patriarche)", + 'parcel__external_id': _(u"Parcel (external ID)"), + 'datings__period': _(u"Datings (period)"), + 'parcel__year': _(u"Parcel (year)"), + } # fields external_id = models.TextField(_(u"External ID"), blank=True, null=True) -- cgit v1.2.3