diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-11-14 19:54:52 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-11-14 19:54:52 +0100 |
commit | 87208abf2d2616faad094f33168b491d2a4efcc8 (patch) | |
tree | 7abaf9aa8e234bff1da2750dcd718a1068f49d29 /archaeological_context_records/models.py | |
parent | 3ee168dad3aebbd07640420fbdb5136bb909038f (diff) | |
parent | 4778f7ab57c5bbd1ec1ff6a0e3bd9e1561ddf454 (diff) | |
download | Ishtar-87208abf2d2616faad094f33168b491d2a4efcc8.tar.bz2 Ishtar-87208abf2d2616faad094f33168b491d2a4efcc8.zip |
Merge branch 'master' into master-trad
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) |