summaryrefslogtreecommitdiff
path: root/archaeological_context_records/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_context_records/models.py')
-rw-r--r--archaeological_context_records/models.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py
index 8a1011084..715e6286c 100644
--- a/archaeological_context_records/models.py
+++ b/archaeological_context_records/models.py
@@ -559,6 +559,7 @@ class ContextRecord(BulkUpdatedItem, DocumentItem, BaseHistorizedItem,
depth = models.FloatField(_("Depth (m)"), blank=True, null=True)
depth_of_appearance = models.FloatField(
_("Depth of appearance (m)"), blank=True, null=True)
+ surface = models.IntegerField(_("Surface (m2)"), blank=True, null=True)
location = models.TextField(
_("Location"), blank=True, null=True,
help_text=_("A short description of the location of the context "
@@ -647,6 +648,11 @@ class ContextRecord(BulkUpdatedItem, DocumentItem, BaseHistorizedItem,
def __str__(self):
return self.short_label or ""
+ @property
+ def surface_ha(self):
+ if self.surface:
+ return self.surface / 10000.0
+
def public_representation(self):
dct = super(ContextRecord, self).public_representation()
dct.update({