From 496d4e2dae227305f51cea113dbf3c20c2893fb0 Mon Sep 17 00:00:00 2001 From: Simon Caminada Date: Tue, 9 Oct 2018 10:45:23 +0200 Subject: [PATCH] fix --- src/project/models.py | 6 +++++- src/project/templates/project/plugins/content/gallery.html | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/project/models.py b/src/project/models.py index 052f08b..bdcc755 100644 --- a/src/project/models.py +++ b/src/project/models.py @@ -342,4 +342,8 @@ class Gallery(CMSPlugin): verbose_name_plural = 'Gallerien' def __str__(self): - return self.folder.name \ No newline at end of file + return self.folder.name + + @property + def files(self): + return self.folder.files.all().order_by('name') diff --git a/src/project/templates/project/plugins/content/gallery.html b/src/project/templates/project/plugins/content/gallery.html index 99ad1ba..1423e39 100644 --- a/src/project/templates/project/plugins/content/gallery.html +++ b/src/project/templates/project/plugins/content/gallery.html @@ -1,7 +1,7 @@ {% load cms_tags i18n thumbnail %}