From 9d4bfc331c72df4a5058e3ebd4b75696d4c7fb55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Sun, 31 May 2015 14:20:57 +0200 Subject: [PATCH] add additional label to galleries --- combo/apps/gallery/models.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/combo/apps/gallery/models.py b/combo/apps/gallery/models.py index ac41a231..9d4a8d3b 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'),