order files alphabetically

This commit is contained in:
Sanj 2011-07-04 14:04:43 +05:30
parent 99b037871b
commit feed0cb63d

View File

@ -103,6 +103,9 @@ class File(models.Model):
fts_fields = ['title', 'description'] fts_fields = ['title', 'description']
class Meta:
ordering = ['title']
@classmethod @classmethod
def filter_category(kls, category_id, qset): def filter_category(kls, category_id, qset):
return qset.filter(categories=category_id) return qset.filter(categories=category_id)