summaryrefslogtreecommitdiff
path: root/archaeological_context_records/models.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2017-03-21 23:00:22 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2017-03-21 23:00:22 +0100
commitabe0902d8c88b1e1acc7a1bff666109f5d18cfe8 (patch)
tree10c6e18b782650e66684b0527adbe768875aed08 /archaeological_context_records/models.py
parentf7a4bd783df87aea052aba07b2a48001b6389772 (diff)
downloadIshtar-abe0902d8c88b1e1acc7a1bff666109f5d18cfe8.tar.bz2
Ishtar-abe0902d8c88b1e1acc7a1bff666109f5d18cfe8.zip
Context records forms/sheet: add documentation types, diameter and depth of appearance (refs #3561)
Diffstat (limited to 'archaeological_context_records/models.py')
-rw-r--r--archaeological_context_records/models.py18
1 files changed, 15 insertions, 3 deletions
diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py
index 14e98e76b..4df56c49f 100644
--- a/archaeological_context_records/models.py
+++ b/archaeological_context_records/models.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
-# Copyright (C) 2012-2016 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet>
+# Copyright (C) 2012-2017 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@@ -129,6 +129,15 @@ post_save.connect(post_save_cache, sender=ExcavationTechnicType)
post_delete.connect(post_save_cache, sender=ExcavationTechnicType)
+class DocumentationType(GeneralType):
+ class Meta:
+ verbose_name = _(u"Documentation type")
+ verbose_name_plural = _(u"Documentation types")
+ ordering = ('label',)
+post_save.connect(post_save_cache, sender=DocumentationType)
+post_delete.connect(post_save_cache, sender=DocumentationType)
+
+
class CRBulkView(object):
CREATE_SQL = """
CREATE VIEW context_records_cached_label_bulk_update
@@ -216,18 +225,21 @@ class ContextRecord(BaseHistorizedItem, ImageModel, OwnPerms,
width = models.FloatField(_(u"Width (m)"), blank=True, null=True)
thickness = models.FloatField(_(u"Thickness (m)"), blank=True,
null=True)
+ diameter = models.FloatField(_(u"Diameter (m)"), blank=True, null=True)
depth = models.FloatField(_(u"Depth (m)"), blank=True, null=True)
+ depth_of_appearance = models.FloatField(
+ _(u"Depth of appearance (m)"), blank=True, null=True)
location = models.TextField(
_(u"Location"), blank=True, null=True,
help_text=_(u"A short description of the location of the context "
u"record"))
datings = models.ManyToManyField(Dating)
+ documentations = models.ManyToManyField(DocumentationType, blank=True,
+ null=True)
datings_comment = models.TextField(_(u"Comment on datings"), blank=True,
null=True)
unit = models.ForeignKey(Unit, verbose_name=_(u"Context record type"),
related_name='+', blank=True, null=True)
- has_furniture = models.NullBooleanField(_(u"Has furniture?"), blank=True,
- null=True)
filling = models.TextField(_(u"Filling"), blank=True, null=True)
interpretation = models.TextField(_(u"Interpretation"), blank=True,
null=True)