diff options
author | Étienne Loks <etienne.loks@peacefrogs.net> | 2013-09-30 18:32:34 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2013-09-30 19:15:46 +0200 |
commit | b6becbf6770dc30a88ef814effecd53b6c707da2 (patch) | |
tree | 7566c425e647dd100783b190b207331f237b4b86 /archaeological_finds/models.py | |
parent | c0fe5367ac92a74e4af4a1994fb7443fbafb6c45 (diff) | |
download | Ishtar-b6becbf6770dc30a88ef814effecd53b6c707da2.tar.bz2 Ishtar-b6becbf6770dc30a88ef814effecd53b6c707da2.zip |
Archaeological finds: add a conservatory state field (refs #1303)
* added to models
* associated migration
* added to search
* added to forms
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) |