summaryrefslogtreecommitdiff
path: root/archaeological_context_records/models.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2016-10-16 23:29:41 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2016-10-16 23:29:41 +0200
commitcd19678576fd28662f5685d4c52552b96a82e251 (patch)
treeceac818ab232d6fb74289ab31571de56086d7bb5 /archaeological_context_records/models.py
parentf9e0e0518c087febb5bf0eb89eac34f685559970 (diff)
downloadIshtar-cd19678576fd28662f5685d4c52552b96a82e251.tar.bz2
Ishtar-cd19678576fd28662f5685d4c52552b96a82e251.zip
List and export context record relations (refs #3329)
Diffstat (limited to 'archaeological_context_records/models.py')
-rw-r--r--archaeological_context_records/models.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py
index 5dc943275..e1cb216a2 100644
--- a/archaeological_context_records/models.py
+++ b/archaeological_context_records/models.py
@@ -363,6 +363,25 @@ class RecordRelations(GeneralRecordRelations, models.Model):
right_record = models.ForeignKey(ContextRecord,
related_name='left_relations')
relation_type = models.ForeignKey(RelationType)
+ TABLE_COLS = [
+ "left_record__label", "left_record__unit", "left_record__parcel",
+ "left_record__datings__period", "left_record__description",
+ "relation_type",
+ "right_record__label", "right_record__unit", "right_record__parcel",
+ "right_record__datings__period", "right_record__description"]
+ TABLE_COLS_LBL = {
+ "left_record__label": _(u"ID (left)"),
+ "left_record__unit": _(u"Unit (left)"),
+ "left_record__parcel": _(u"Parcel (left)"),
+ "left_record__description": _(u"Description (left)"),
+ "left_record__datings__period": _(u"Periods (left)"),
+ "relation_type": _(u"Relation type"),
+ "right_record__label": _(u"Unit (right)"),
+ "right_record__unit": _(u"Parcel (right)"),
+ "right_record__parcel": _(u"Parcel (right)"),
+ "right_record__description": _(u"Description (right)"),
+ "right_record__datings__period": _(u"Periods (right)")
+ }
class Meta:
verbose_name = _(u"Record relation")