Complete the code to import the function that renders HTML templates in Flask.
from flask import [1]
The render_template function is imported from Flask to render HTML files.
Complete the code to return the 'index.html' template from a Flask route.
@app.route('/') def home(): return [1]('index.html')
Use render_template to show the 'index.html' page when the home route is accessed.
Fix the error in the code to correctly render 'about.html' with Flask.
@app.route('/about') def about(): return render_template([1])
The template name must be a string with quotes. Both "about.html" (A) and 'about.html' (C) are correct.
Fill both blanks to pass a variable 'name' with value 'Alice' to the template.
return render_template('hello.html', [1]=[2])
Pass the variable name as name and its value as the string 'Alice' to the template.
Fill all three blanks to render 'profile.html' passing the 'username' variable with value 'john_doe'.
return render_template('[1]', [2]=[3])
Render 'profile.html' passing the variable username with value 'john_doe' to the template.