I am trying to get the result to displayed in web but only get the param specified in the html code and not the actual entry that was made with the form. The form takes in a string and then should be displayed as a result, but I only get the output below.
I am new to this so any guidance please.
@app.route('/dibble2', methods=["GET", "POST"])
def dibble2():
if request.method == "POST":
input1 = None
input1 = str(request.form["input1"])
if input1 is not None:
result = is_create_ds(string1)
return render_template("outco.html", result = result)
return render_template("inco.html")
Output I get displayed once you submit the entered string is:
Result Check: {result}
It should output something like the following:
Result Check: Alright
Here is the html code it calls:
<html>
<body>
<p>Result Check: {result}</p>
<p><a href="/dibble2">Try Again</a>
</body>
</html>