From: hernani Date: Thu, 26 May 2011 14:49:47 +0000 (+0000) Subject: Allow modules to set custom sorts on rss feeds. X-Git-Tag: live~264 X-Git-Url: https://git.openstreetmap.org/osqa.git/commitdiff_plain/f9352bf3ad9c97819f9630c0be59e2248dc50def Allow modules to set custom sorts on rss feeds. git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@1049 0cfe37f9-358a-4d5e-be75-b63607b5c754 --- diff --git a/forum/views/readers.py b/forum/views/readers.py index 9efdf07..6ee2c24 100644 --- a/forum/views/readers.py +++ b/forum/views/readers.py @@ -159,7 +159,8 @@ def question_list(request, initial, page_title=_("All Questions"), allowIgnoreTags=True, feed_url=None, - paginator_context=None): + paginator_context=None, + feed_sort='-added_at'): questions = initial.filter_state(deleted=False) @@ -170,7 +171,7 @@ def question_list(request, initial, page_title = _("Questions") if request.GET.get('type', None) == 'rss': - questions = questions.order_by('-added_at') + questions = questions.order_by(feed_sort) return RssQuestionFeed(request, questions, page_title, list_description)(request) keywords = ""