diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-11-14 19:43:27 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-11-14 19:43:27 +0100 |
commit | e4c0173adc1250fe608f477bb80cbdc5bddc3885 (patch) | |
tree | 7464bd027f0921b8811f7a15337a5bce099b8211 /archaeological_context_records/models.py | |
parent | 04fed929817936981dc3031379a4e8fbd13fb8f4 (diff) | |
download | Ishtar-e4c0173adc1250fe608f477bb80cbdc5bddc3885.tar.bz2 Ishtar-e4c0173adc1250fe608f477bb80cbdc5bddc3885.zip |
Explicit CSV headers (refs #3340)
Diffstat (limited to 'archaeological_context_records/models.py')
-rw-r--r-- | archaeological_context_records/models.py | 13 |
1 files changed, 11 insertions, 2 deletions
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) |