diff options
author | Étienne Loks <etienne.loks@peacefrogs.net> | 2011-04-22 11:23:34 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2011-04-22 11:23:34 +0200 |
commit | 3c1f82125efcceb84d9cfe3729cd435ff4fc5dc0 (patch) | |
tree | 378a85b20307bdbaf08e3a36760527247d0c36dc /ishtar/furnitures/models.py | |
parent | ca92ada04a5440c7bcfb9ec6f1bae3fc9f3902ab (diff) | |
download | Ishtar-3c1f82125efcceb84d9cfe3729cd435ff4fc5dc0.tar.bz2 Ishtar-3c1f82125efcceb84d9cfe3729cd435ff4fc5dc0.zip |
Adding fields to context records (closes #375)
Diffstat (limited to 'ishtar/furnitures/models.py')
-rw-r--r-- | ishtar/furnitures/models.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/ishtar/furnitures/models.py b/ishtar/furnitures/models.py index f9e9080df..44e0e9391 100644 --- a/ishtar/furnitures/models.py +++ b/ishtar/furnitures/models.py @@ -681,6 +681,25 @@ class Unit(GeneralType): def __unicode__(self): return self.label +class ActivityType(GeneralType): + order = models.IntegerField(_(u"Order")) + + class Meta: + verbose_name = _(u"Type Activity") + verbose_name_plural = _(u"Types Activity") + + def __unicode__(self): + return self.label + +class IdentificationType(GeneralType): + order = models.IntegerField(_(u"Order")) + class Meta: + verbose_name = _(u"Type Identification") + verbose_name_plural = _(u"Types Identification") + + def __unicode__(self): + return self.label + class ContextRecord(BaseHistorizedItem, OwnPerms): TABLE_COLS = ['parcel.town', 'parcel.operation.year', 'parcel.operation.operation_code', @@ -716,6 +735,10 @@ class ContextRecord(BaseHistorizedItem, OwnPerms): " created before this date")) tpq_estimated = models.IntegerField(_(u"Estimated TPQ"), blank=True, null=True, help_text=_("Estimation of a \"Terminus Post Quem\"")) + identification = models.ForeignKey(IdentificationType, blank=True, + null=True, verbose_name=_(u"Identification"),) + activity = models.ForeignKey(ActivityType,blank=True, null=True, + verbose_name=_(u"Activity"),) history = HistoricalRecords() class Meta: |