]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/forms/qanda.py
reversed the search order of the revisions drop down menu.
[osqa.git] / forum / forms / qanda.py
index a3c093c586f4556c904ab8ae4a805c02430bfcdb..39f9ca77cc774872d209ac1f6449503c9bc5839d 100644 (file)
@@ -136,7 +136,7 @@ class SummaryField(forms.CharField):
 
 class FeedbackForm(forms.Form):
     name = forms.CharField(label=_('Your name:'), required=False)
-    email = forms.EmailField(label=_('Email (not shared with anyone):'), required=False)
+    email = forms.EmailField(label=_('Email (not shared with anyone):'), required=True)
     message = forms.CharField(label=_('Your message:'), max_length=800,widget=forms.Textarea(attrs={'cols':60}))
     next = NextUrlField()
 
@@ -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]))