]> git.openstreetmap.org Git - osqa.git/commitdiff
osqa-90
authorqw3rty <qw3rty@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Mon, 10 May 2010 17:05:23 +0000 (17:05 +0000)
committerqw3rty <qw3rty@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Mon, 10 May 2010 17:05:23 +0000 (17:05 +0000)
the sort order of the questions are now set back to active on page change.

git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@194 0cfe37f9-358a-4d5e-be75-b63607b5c754

forum/views/readers.py

index 7f201aa551357d362c8bb88b2e22a65f1e4e6f4f..beb3744936546638d0722761bc77eab4496c11d5 100644 (file)
@@ -48,16 +48,18 @@ def index(request):
 @decorators.render('questions.html', 'unanswered')
 def unanswered(request):
     return question_list(request, Question.objects.filter(extra_ref=None),
-                         _('Open questions without an accepted answer'))
+                         _('Open questions without an accepted answer'),
+                         sort='active')
 
 @decorators.render('questions.html', 'questions')
 def questions(request):
-    return question_list(request, Question.objects.all())
+    return question_list(request, Question.objects.all(), sort='active')
 
 @decorators.render('questions.html')
 def tag(request, tag):
     return question_list(request, Question.objects.filter(tags__name=unquote(tag)),
-                        mark_safe(_('Questions tagged <span class="tag">%(tag)s</span>') % {'tag': tag}))
+                        mark_safe(_('Questions tagged <span class="tag">%(tag)s</span>') % {'tag': tag}),
+                        sort='active')
 
 @decorators.list('questions', QUESTIONS_PAGE_SIZE)
 def question_list(request, initial, list_description=_('questions'), sort=None, base_path=None):