Commits

Bertrand Bordage  committed 67d0372

Order images by file name.

Images were unordered before this commit.

  • Participants
  • Parent commits 29037ca

Comments (0)

Files changed (1)

File cmsplugin_nivoslider/models.py

     @property
     def images(self):
         if not hasattr(self, '__images'):
-            self.__images = filter(lambda f: f.file_type == 'Image',
-                                   self.album.files)
+            self.__images = [f for f in self.album.files.order_by('file')
+                               if f.file_type == 'Image']
         return self.__images
 
     search_fields = ('title', 'album__title',)