summaryrefslogtreecommitdiff
path: root/archaeological_context_records/models.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2017-03-13 15:38:34 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2017-03-13 15:38:34 +0100
commit749a5fa0444d66c8a3656edae9f0e6b6f12b9870 (patch)
treebe5fee1bbabb81eb009f4e6f6872e3aa79c4b05e /archaeological_context_records/models.py
parent3f549a53ba20ecd872fc3494351309c56c1c26b5 (diff)
downloadIshtar-749a5fa0444d66c8a3656edae9f0e6b6f12b9870.tar.bz2
Ishtar-749a5fa0444d66c8a3656edae9f0e6b6f12b9870.zip
Context record: add type of excavation technics (refs #3487)
Diffstat (limited to 'archaeological_context_records/models.py')
-rw-r--r--archaeological_context_records/models.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py
index 2b43635ac..04ca358e3 100644
--- a/archaeological_context_records/models.py
+++ b/archaeological_context_records/models.py
@@ -120,6 +120,15 @@ post_save.connect(post_save_cache, sender=IdentificationType)
post_delete.connect(post_save_cache, sender=IdentificationType)
+class ExcavationTechnicType(GeneralType):
+ class Meta:
+ verbose_name = _(u"Excavation technic type")
+ verbose_name_plural = _(u"Excavation technic types")
+ ordering = ('label',)
+post_save.connect(post_save_cache, sender=ExcavationTechnicType)
+post_delete.connect(post_save_cache, sender=ExcavationTechnicType)
+
+
class CRBulkView(object):
CREATE_SQL = """
CREATE VIEW context_records_cached_label_bulk_update
@@ -240,6 +249,9 @@ class ContextRecord(BaseHistorizedItem, ImageModel, OwnPerms,
verbose_name=_(u"Identification"),)
activity = models.ForeignKey(ActivityType, blank=True, null=True,
verbose_name=_(u"Activity"),)
+ excavation_technic = models.ForeignKey(
+ ExcavationTechnicType, blank=True, null=True,
+ verbose_name=_(u"Excavation technic"))
related_context_records = models.ManyToManyField(
'ContextRecord', through='RecordRelations', blank=True, null=True)
point = models.PointField(_(u"Point"), blank=True, null=True, dim=3)