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 | 4b8e5f1c4471b8afd88f6de2c552e436dc7ce087 (patch) | |
| tree | 378a85b20307bdbaf08e3a36760527247d0c36dc /ishtar/furnitures/models.py | |
| parent | 67970522bdb15496e5a46c8a54249801930b5b4c (diff) | |
| download | Ishtar-4b8e5f1c4471b8afd88f6de2c552e436dc7ce087.tar.bz2 Ishtar-4b8e5f1c4471b8afd88f6de2c552e436dc7ce087.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: |
