diff options
Diffstat (limited to 'archaeological_finds/models.py')
-rw-r--r-- | archaeological_finds/models.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/archaeological_finds/models.py b/archaeological_finds/models.py index 6dcbbce65..d957860e7 100644 --- a/archaeological_finds/models.py +++ b/archaeological_finds/models.py @@ -417,6 +417,7 @@ class Find(BaseHistorizedItem, ImageModel, OwnPerms, ShortMenuItem): width = models.FloatField(_(u"Width (cm)"), blank=True, null=True) height = models.FloatField(_(u"Height (cm)"), blank=True, null=True) diameter = models.FloatField(_(u"Diameter (cm)"), blank=True, null=True) + thickness = models.FloatField(_(u"Thickness (cm)"), blank=True, null=True) dimensions_comment = models.TextField(_(u"Dimensions comment"), blank=True, null=True) mark = models.TextField(_(u"Mark"), blank=True, null=True) @@ -524,6 +525,12 @@ class Find(BaseHistorizedItem, ImageModel, OwnPerms, ShortMenuItem): treatments.append((q.all(), findtreat.treatment)) return treatments + @property + def weight_string(self): + if not self.weight: + return "" + return "{} {}".format(self.weight, self.weight_unit or "") + def upstream_treatments(self): return self._get_treatments(FindUpstreamTreatments, 'upstream') |