So essentially I'd like to be able to type in the URL e.g. http://example.com/"something", and if there is nothing render the index.html. For some reason that isn't working. On the other side i'd like to be able to pass that parameter, e.g. http://example.com/host123 and use that in the result function below. Ideally in the end I am able to simply type in the URL example.com/host123 and take me directly to that page.
@app.route('/<host>',methods= ['POST', 'GET'])
15 def index(host):
16 if host is None:
17 return render_template("index.html")
18 else:
19 return result(host)
20 print("test")
21 @app.route('/<host>',methods= ['POST', 'GET'])
22 def result(host):
#some code....