From 6c5ec1171b2232c7ec6e4f340dcc94de4ea43154 Mon Sep 17 00:00:00 2001 From: qw3rty Date: Mon, 10 May 2010 17:05:23 +0000 Subject: [PATCH] osqa-90 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 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/forum/views/readers.py b/forum/views/readers.py index 7f201aa..beb3744 100644 --- a/forum/views/readers.py +++ b/forum/views/readers.py @@ -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 %(tag)s') % {'tag': tag})) + mark_safe(_('Questions tagged %(tag)s') % {'tag': tag}), + sort='active') @decorators.list('questions', QUESTIONS_PAGE_SIZE) def question_list(request, initial, list_description=_('questions'), sort=None, base_path=None): -- 2.39.5