X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/6b22f44c53cf0d72a7b2b068f51cae01e1129e23..988c0eb318f4af28bad7d7714e7410699d7cae30:/forum/views/readers.py diff --git a/forum/views/readers.py b/forum/views/readers.py index 7a73856..07f6a3f 100644 --- a/forum/views/readers.py +++ b/forum/views/readers.py @@ -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,