summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2015-05-31 12:20:57 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2019-05-01 13:53:33 (GMT)
commit9d4bfc331c72df4a5058e3ebd4b75696d4c7fb55 (patch)
treeba07b1f53c49b838d388aa67e702c6528bcc9e7a
parent72a80d98cdea9e0c95fae4dcd4e2a7cf8a62cc68 (diff)
downloadcombo-wip/gallery.zip
combo-wip/gallery.tar.gz
combo-wip/gallery.tar.bz2
add additional label to gallerieswip/gallery
-rw-r--r--combo/apps/gallery/models.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/combo/apps/gallery/models.py b/combo/apps/gallery/models.py
index ac41a23..9d4a8d3 100644
--- a/combo/apps/gallery/models.py
+++ b/combo/apps/gallery/models.py
@@ -34,6 +34,12 @@ class GalleryCell(CellBase):
gallery_template = template.loader.get_template('combo/gallery.html')
return gallery_template.render(context)
+ def get_additional_label(self):
+ if self.title:
+ return self.title
+ return ''
+
+
class Image(models.Model):
gallery = models.ForeignKey(GalleryCell, verbose_name=_('Gallery'))
image = models.ImageField(_('Image'),