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 %}