Hi im working with python and flask
im trying to make a page that server takes you to page 1
then you send information to the server
then takes you to page 2.
then you send information
and it takes you to page 3.
How whould i do that?
Here is some sample code that i attempted not sure if its remotely close
@app.route('/',methods=['GET', 'POST'])
def hello():
if request.method == 'GET':
return render_template('SelectOption.html');
elif request.method == 'POST':
option = request.form['option'];
if option == "1":
return render_template('Option1.html', option = option)
if request.method == 'POST':
return render_template('charts.html');
elif option =="2":
return render_template("Charts.html")
if request.method == 'POST':
return render_template('charts.html');
This sort of logic should be handled within the template itself, or should be split among multiple pages.
Multiple page example:
Split template example:
post.html:
get.html: