From 501578a66b7d408ae40d18b4f3b5d7e9bc5ab2b2 Mon Sep 17 00:00:00 2001 From: sqozz Date: Thu, 28 Dec 2017 03:14:12 +0100 Subject: [PATCH] Fix subpages --- indexer.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/indexer.py b/indexer.py index a705793..6165b79 100644 --- a/indexer.py +++ b/indexer.py @@ -13,7 +13,8 @@ def index(): @app.route("/categories") def categorys(): - return render_template("categories.html", categories=settings["categories"]) + global strings + return render_template("categories.html", categories=settings["categories"], strings=strings) @app.route("/create", methods=['GET','POST']) def create(): @@ -28,7 +29,9 @@ def create(): @app.route("/search", methods=['GET']) def search(): - return render_template("result.html", results=request.args.get("q", "")) + global strings + print(strings) + return render_template("result.html", results=request.args.get("q", ""), strings=strings, language="english", categories=settings["categories"]) def init(): global strings @@ -115,4 +118,4 @@ if __name__ == "__main__": app.jinja_env.globals.update(getLocalString=getLocalString) app.jinja_env.globals.update(json=json) app.jinja_env.globals.update(sorted=sorted) - app.run(debug=False, host="0.0.0.0") + app.run(debug=True, host="127.0.0.1")