Commits

Anonymous committed fd76fdf

sort file attachments by title text and filename

Comments (0)

Files changed (1)

c5t/core/model/content.py

 
     @property
     def files(self):
-        return File.query.find_by(parent_id=self._id)
+        the_files = File.query.find_by(parent_id=self._id)
+        return sorted(the_files, key=lambda k: (k['text'].lower(), k['title'].lower()))
 
 #    @property
 #    def news(self):