From 0cecbb7cfa1a21237b238a89ff3451815aae847d Mon Sep 17 00:00:00 2001 From: Seth Woodworth Date: Fri, 1 Feb 2013 15:47:02 -0500 Subject: [PATCH] invert notes defaute sorting --- karmaworld/apps/notes/models.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/karmaworld/apps/notes/models.py b/karmaworld/apps/notes/models.py index 2d0ddd5..620558b 100644 --- a/karmaworld/apps/notes/models.py +++ b/karmaworld/apps/notes/models.py @@ -56,6 +56,10 @@ class Note(models.Model): #course = models.ForeignKey(Course, blank=True, null=True, related_name="files") #school = models.ForeignKey(School, blank=True, null=True) + class Meta: + """ Sort files by most recent first """ + ordering = ['-uploaded_at'] + def __unicode__(self): return u"{0}: {1} -- {2}".format(self.file_type, self.name, self.uploaded_at) -- 2.25.1