diff options
Diffstat (limited to 'ishtar_common/models.py')
| -rw-r--r-- | ishtar_common/models.py | 9 | 
1 files changed, 7 insertions, 2 deletions
| diff --git a/ishtar_common/models.py b/ishtar_common/models.py index 1045adbe5..3e5b44d8a 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -2341,7 +2341,7 @@ class DocumentTemplate(models.Model):          return output_name -class Area(HierarchicalType, DocumentItem): +class Area(HierarchicalType, DocumentItem, MainItem):      SLUG = "area"      towns = models.ManyToManyField(          Town, verbose_name=_("Towns"), blank=True, related_name="areas" @@ -2450,8 +2450,13 @@ class Area(HierarchicalType, DocumentItem):      def _get_base_image_path(self):          return self.SLUG +    @property +    def associated_filename(self): +        value = self.reference if self.reference else self.name +        return slugify(value) + -#m2m_changed.connect(document_attached_changed, sender=Area.documents.through) +m2m_changed.connect(document_attached_changed, sender=Area.documents.through)  GENDER = ( | 
