From 749a5fa0444d66c8a3656edae9f0e6b6f12b9870 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 13 Mar 2017 15:38:34 +0100 Subject: Context record: add type of excavation technics (refs #3487) --- archaeological_context_records/models.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'archaeological_context_records/models.py') 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) -- cgit v1.2.3