summaryrefslogtreecommitdiff
path: root/archaeological_context_records/models.py
diff options
context:
space:
mode:
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
commit5425d758a20ed773fd2eedac02ffdf639e4b3aad (patch)
tree7abaf9aa8e234bff1da2750dcd718a1068f49d29 /archaeological_context_records/models.py
parent8ac9256b58a681f7507cd21b75f2698a2fc2526c (diff)
parente4c0173adc1250fe608f477bb80cbdc5bddc3885 (diff)
downloadIshtar-5425d758a20ed773fd2eedac02ffdf639e4b3aad.tar.bz2
Ishtar-5425d758a20ed773fd2eedac02ffdf639e4b3aad.zip
Merge branch 'master' into master-trad
Diffstat (limited to 'archaeological_context_records/models.py')
-rw-r--r--archaeological_context_records/models.py13
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)