Question 10
Consider the following flask application.
Python file: app.py
from flask import Flask, render_template, request
app = Flask(__name__)
emp = {'admin':'manoj', 'user':'sumit'}
@app.route('/profile/<user>')def profile(user): access = request.args.get('access') if emp[access] != user: return render_template("profile.html", user = user, access = access, error = True) return render_template("profile.html", user = user, access = access, error = False)
app.run()Template file: profile.html
<body> <div> {% if error %} <h3>Hi {{user}}, {{access}} access denied</h3> {% else %} <h3>Hi {{user}}, you are logged in as {{access}}.</h3> {% endif %} </div></body>If the application is running locally on http://127.0.0.1:5000, then what will be rendered by the browser for URL,
http://127.0.0.1:5000/profile/sumit?access=admin ?