How do I reference input in a python flask code, for some reason request.form doesn't seem to be working. Here's the code:
@app.route("/post_field", methods=["GET", "POST"])
def need_input():
forum = ['def']
inputf = request.form["fname"]
if inputf == 'test':
forum.append(inputf)
return """
<html>
<body>
<p>
<font face="Times New Roman" size="+2" color="#870012">{forum}</font>
<form method="post" action=".">
<p>
<input id="fname" name="fname"</p>
</form>
</body>
</html>
""".format(forum=forum)