From cb628d88e54267b9b46a1cfc37f24f0c5bb7f2cb Mon Sep 17 00:00:00 2001 From: raven Date: Fri, 18 Jun 2021 19:17:54 +0000 Subject: newline addition --- apioforum/forum.py | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/apioforum/forum.py b/apioforum/forum.py index 92e981c..f3354c3 100644 --- a/apioforum/forum.py +++ b/apioforum/forum.py @@ -78,12 +78,26 @@ def search(): display_thread_id[ix] = False last_thread = result["thread"] rendered_posts = [render(q['content']) for q in results] - return render_template("search_results.html", results=results, query=query, rendered_posts=rendered_posts, display_thread_id=display_thread_id) + return render_template("search_results.html", + results=results, + query=query, + rendered_posts=rendered_posts, + display_thread_id=display_thread_id + ) @bp.route("/rss") def rss_feed(): db = get_db() print(request.host_url) items = db.execute("SELECT * FROM posts ORDER BY updated DESC LIMIT 50") - items = [ { **item, "rendered": render(item["content"]), "link": request.base_url + post_jump(item["thread"], item["id"]), "updated": item["updated"] or item["created"] } for item in items ] - return Response(render_template("rss.xml", title="New posts feed", description="The latest posts on the Apioforum", link=request.base_url, items=items), mimetype="text/xml") \ No newline at end of file + items = [ { + **item, + "rendered": render(item["content"]), + "link": request.base_url + post_jump(item["thread"], item["id"]), + "updated": item["updated"] or item["created"] + } for item in items ] + return Response(render_template("rss.xml", + title="New posts feed", + description="The latest posts on the Apioforum", + link=request.base_url, items=items), + mimetype="text/xml") -- cgit v1.2.3