Fix subpages
This commit is contained in:
parent
3092c2e615
commit
501578a66b
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user