Question 16
Consider the following code and answer the given subquestions.
form.html
<!DOCTYPE html><body> <form method=Method> Enter Your Name : <input type="text" name="name"> <button>Submit</button> </form></body></html>app.py
from flask import Flaskfrom flask import render_template, request
app=Flask(__name__)
@app.route("/",methods=['GET','POST'])
def home(): if request.method=="GET": return render_template("form.html") else: return render_template("home.html")
app.run(debug=True)