diff options
author | raven <raven> | 2021-06-18 19:17:54 +0000 |
---|---|---|
committer | raven <raven> | 2021-06-18 19:17:54 +0000 |
commit | cb628d88e54267b9b46a1cfc37f24f0c5bb7f2cb (patch) | |
tree | 1413eb6fda26f93f0c8641c413653b83a5d7a979 | |
parent | 87650ea73d719f8caf3859f27eb12fa651fc774f (diff) |
newline addition
-rw-r--r-- | apioforum/forum.py | 20 |
1 files 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") |