diff options
Diffstat (limited to 'archaeological_context_records/models.py')
| -rw-r--r-- | archaeological_context_records/models.py | 11 | 
1 files changed, 11 insertions, 0 deletions
| diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py index d2325082d..3b236346d 100644 --- a/archaeological_context_records/models.py +++ b/archaeological_context_records/models.py @@ -90,6 +90,17 @@ class Dating(models.Model):              return str(self.period)          return "%s (%s-%s)" % (self.period, start_date, end_date) +    def get_values(self, prefix='', no_values=False): +        return { +            prefix + "period": str(self.period), +            prefix + "start_date": self.start_date or '', +            prefix + "end_date": self.end_date or "", +            prefix + "dating_type": +                str(self.dating_type) if self.dating_type else "", +            prefix + "quality": str(self.quality) if self.quality else "", +            prefix + "precise_dating": self.precise_dating +        } +      HISTORY_ATTR = ["period", "start_date", "end_date", "dating_type",                      "quality", "precise_dating"] | 
