From 7c53f89ccdd92e308d14d069e2e070f7a1c2da26 Mon Sep 17 00:00:00 2001 From: jwansek Date: Mon, 27 Feb 2023 00:05:41 +0000 Subject: Added q&a page --- app.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'app.py') diff --git a/app.py b/app.py index 75558f8..556d61a 100755 --- a/app.py +++ b/app.py @@ -236,6 +236,16 @@ def serve_random(): localimg = "/img/random.jpg?seed=%i" % random.randint(0, 9999) ) +@app.route("/questions") +def serve_questions(): + with database.Database() as db: + return flask.render_template( + "questions.html.j2", + **get_template_items("random image", db), + curiouscat_username = db.get_curiouscat_username(), + qnas = db.get_curiouscat_qnas() + ) + if __name__ == "__main__": try: if sys.argv[1] == "--production": -- cgit v1.2.3