Relevant Flask code:
@app.route('/test/<testvar>', methods=["POST", "GET"])
def testTheVar(testvar):
if request.method == "POST":
pass
return render_template("test_page.html")
test_page.html: <html>
<head>
</head>
<body>
<div class="container">
<div class="row">
<form action="." method="POST">
<textarea class="form-control" name="move" placeholder="Enter Your Move Here"></textarea>
<input type="submit" value="Submit Move">
</form>
</div>
</div>
</body>
</html>
When I go to zswitten2.pythonanywhere.com/test/ttt, the page loads fine. But when I submit any text with the button, the page redirects to zswitten2.pythonanywhere.com/test/, and gives this error:
The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
Why is this redirect occurring? Thanks in advance.