from flask import Flask, render_template, request
app = Flask(__name__)
@app.route('/', methods = ['GET', 'POST'])
@app.route('/', methods = ['GET', 'POST'])
def Input_1():
name1 = ""
if request.method == 'POST':
name1 = request.form.get("name1", "0")
return render_template('index.html', DataFromPython1 = name1)
def Input_2():
name2 = ""
if request.method == "POST":
name2 = request.form.get("name2", "0")
return render_template('index.html', DataFromPython2 = name2)
if __name__ == '__main__':
app.run()
This is my code
First function works well, but second function dose not work as first function.
I gave input in second box but nothing happened
what do I have to do to get two inputs at same time?