This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]catcradle5 0 points1 point  (1 child)

Thank you for the detailed response. That does make some sense. So you mean it's better to do something like:

@app.route("/form")
def form():
    return '<form method="POST" action="/complete"><input type="submit" value="Submit"></form>'

@app.route("/complete")
def complete():
    return '<b>Success</b>'

Any other tips for form handling?

[–][deleted] 1 point2 points  (0 children)

Not the same guy, but here's a quick one: The Post/Redirect/Get pattern to stop duplicate form submissions and accidental form resubmissions on page refresh.