Fix subpages
This commit is contained in:
		@@ -13,7 +13,8 @@ def index():
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
@app.route("/categories")
 | 
					@app.route("/categories")
 | 
				
			||||||
def categorys():
 | 
					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'])
 | 
					@app.route("/create", methods=['GET','POST'])
 | 
				
			||||||
def create():
 | 
					def create():
 | 
				
			||||||
@@ -28,7 +29,9 @@ def create():
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
@app.route("/search", methods=['GET'])
 | 
					@app.route("/search", methods=['GET'])
 | 
				
			||||||
def search():
 | 
					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():
 | 
					def init():
 | 
				
			||||||
	global strings
 | 
						global strings
 | 
				
			||||||
@@ -115,4 +118,4 @@ if __name__ == "__main__":
 | 
				
			|||||||
	app.jinja_env.globals.update(getLocalString=getLocalString)
 | 
						app.jinja_env.globals.update(getLocalString=getLocalString)
 | 
				
			||||||
	app.jinja_env.globals.update(json=json)
 | 
						app.jinja_env.globals.update(json=json)
 | 
				
			||||||
	app.jinja_env.globals.update(sorted=sorted)
 | 
						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")
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user