diff options
Diffstat (limited to 'archaeological_finds/models.py')
-rw-r--r-- | archaeological_finds/models.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/archaeological_finds/models.py b/archaeological_finds/models.py index c832fdf70..f694ed562 100644 --- a/archaeological_finds/models.py +++ b/archaeological_finds/models.py @@ -42,6 +42,15 @@ class MaterialType(GeneralType): verbose_name_plural = _(u"Material types") ordering = ('label',) +class ConservatoryState(GeneralType): + parent = models.ForeignKey("ConservatoryState", blank=True, null=True, + verbose_name=_(u"Parent conservatory state")) + + class Meta: + verbose_name = _(u"Conservatory state") + verbose_name_plural = _(u"Conservatory states") + ordering = ('label',) + class BaseFind(BaseHistorizedItem, OwnPerms): label = models.CharField(_(u"ID"), max_length=60) description = models.TextField(_(u"Description")) @@ -148,6 +157,8 @@ class Find(BaseHistorizedItem, ImageModel, OwnPerms): description = models.TextField(_(u"Description"), blank=True, null=True) material_type = models.ForeignKey(MaterialType, verbose_name = _(u"Material type")) + conservatory_state = models.ForeignKey(ConservatoryState, + verbose_name = _(u"Conservatory state"), blank=True, null=True) volume = models.FloatField(_(u"Volume (l)"), blank=True, null=True) weight = models.FloatField(_(u"Weight (g)"), blank=True, null=True) find_number = models.IntegerField(_("Find number"), blank=True, null=True) |