]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/views/readers.py
OSQA-386
[osqa.git] / forum / views / readers.py
index 7a73856317486c23def9391a8c6a1462815e00b9..07f6a3f2de3f5c44940939dbe4a11af1610c3637 100644 (file)
@@ -149,7 +149,11 @@ def question_list(request, initial,
     answer_description = _("answers")
 
     if not feed_url:
-        feed_url = request.path + "?type=rss"
+        req_params = "&".join(["%s=%s" % (k, v) for k, v in request.GET.items() if not k in ('page', 'pagesize', 'sort')])
+        if req_params:
+            req_params = '&' + req_params
+
+        feed_url = mark_safe(request.path + "?type=rss" + req_params)
 
     return {
     "questions" : questions,
@@ -336,11 +340,10 @@ REVISION_TEMPLATE = template.loader.get_template('node/revision.html')
 def revisions(request, id):
     post = get_object_or_404(Node, id=id).leaf
     revisions = list(post.revisions.order_by('revised_at'))
-
     rev_ctx = []
 
     for i, revision in enumerate(revisions):
-        rev_ctx.append(dict(inst=revision, html=REVISION_TEMPLATE.render(template.Context({
+        rev_ctx.append(dict(inst=revision, html=template.loader.get_template('node/revision.html').render(template.Context({
         'title': revision.title,
         'html': revision.html,
         'tags': revision.tagname_list(),
@@ -356,6 +359,8 @@ def revisions(request, id):
         else:
             rev_ctx[i]['summary'] = revision.summary
 
+    rev_ctx.reverse()
+
     return render_to_response('revisions.html', {
     'post': post,
     'revisions': rev_ctx,