Question 6
You're creating a registration form. The form is written as:
<form action="/register" method="post">And in Flask:
@app.route("/register")def register(): return "Form received"When the user submits the form, they see a 405 Method Not Allowed error. Why is this happening?
There is no return statement inside the function
The form is missing CSRF protection
The Flask route does not allow POST method
The route should have a trailing slash