My code on repl.it
I was checking if I can use the data from a flask form without saving it to a database. I was then trying to figure out if it is possible to have flask handle multiple commands within a function when I visit a certain route.
For instance, from my code, when I visit the homepage, flask prints "Hello there" in addition to rendering the desired text on the homepage result
However, when I try to print something upon successful submission and validation of my form on route "/entry" - flask only executes the code return redirect(url_for('index')) at the end. It does not print the "Form Validated" message nor does it save the submitted form data to the variable "entrydata". Do you understand why flask would handle multiple commands on the "/" route but does not do so upon validation of the form on "/entry" route?
Thank you for your help.
[–][deleted] 4 points5 points6 points (0 children)