1. Konrad Rymczak
  2. cmsplugin-nivoslider

Commits

Bertrand Bordage  committed 5d68986

Fixes the order of images, following stefanfoulis/django-filer#253.

  • Participants
  • Parent commits e5ed930
  • Branches default

Comments (0)

Files changed (1)

File cmsplugin_nivoslider/models.py

View file
  • Ignore whitespace
     @property
     def images(self):
         if not hasattr(self, '__images'):
-            files = self.album.files.order_by('name', 'original_filename')
+            files = self.album.files
             self.__images = [f for f in files if f.file_type == 'Image']
+            self.__images.sort()
         return self.__images
 
     @property