diff options
Diffstat (limited to 'archaeological_files/models.py')
-rw-r--r-- | archaeological_files/models.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/archaeological_files/models.py b/archaeological_files/models.py index 7b7a7d9b5..49b9086d0 100644 --- a/archaeological_files/models.py +++ b/archaeological_files/models.py @@ -68,7 +68,7 @@ class File(BaseHistorizedItem, OwnPerms): null=True, max_length=60, unique=True) name = models.CharField(_(u"Name"), max_length=100, blank=True, null=True) file_type = models.ForeignKey(FileType, verbose_name=_(u"File type")) - in_charge = models.ForeignKey(Person, related_name='+', + in_charge = models.ForeignKey(Person, related_name='file_responsability', verbose_name=_(u"Person in charge"), blank=True, null=True) general_contractor = models.ForeignKey(Person, related_name='+', @@ -180,6 +180,10 @@ class File(BaseHistorizedItem, OwnPerms): def is_active(self): return not bool(self.end_date) + @property + def town_list(self): + return u", ".join([unicode(tw) for tw in self.towns.all()]) + def closing(self): if self.is_active(): return |