Question 25
Consider the following flask application.
app.py
from flask import Flask, render_template, requestapp = Flask(__name__)@app.route('/', methods=['GET'])def my_form(): if request.method == 'GET': if(request.args.get('name') == None): return """ <form method="GET" action ="/"> <label for="name">Enter a name: </label> <input type="text" name="name" id="name"></input> <input type="submit" name="btnnum" id="btnnum"></input> </form> """ elif(request.args.get('name') == ''): return "<h1>Invalid name</h1>" else: name = request.args.get('name') return f"<h2>My name is {name}</h2>"
app.run()If this flask app is running locally on http://localhost:5000, then which of the following statements is/are incorrect?