]> git.openstreetmap.org Git - osqa.git/commitdiff
reversed the search order of the revisions drop down menu.
authorqw3rty <qw3rty@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Thu, 1 Jul 2010 15:09:23 +0000 (15:09 +0000)
committerqw3rty <qw3rty@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Thu, 1 Jul 2010 15:09:23 +0000 (15:09 +0000)
git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@481 0cfe37f9-358a-4d5e-be75-b63607b5c754

forum/forms/qanda.py

index d54eabb7cdeed00baf2e9490378170ed62deff00..39f9ca77cc774872d209ac1f6449503c9bc5839d 100644 (file)
@@ -182,8 +182,8 @@ class RevisionForm(forms.Form):
     def __init__(self, post, *args, **kwargs):
         super(RevisionForm, self).__init__(*args, **kwargs)
 
-        revisions = post.revisions.all().values_list(
-            'revision', 'author__username', 'revised_at', 'summary')
+        revisions = post.revisions.all().values_list('revision', 'author__username', 'revised_at', 'summary').order_by('-revised_at')
+
         date_format = '%c'
         self.fields['revision'].choices = [
             (r[0], u'%s - %s (%s) %s' % (r[0], r[1], r[2].strftime(date_format), r[3]))