import
from flask import Flask
other imports
render_template, request
first line of code to start flask app
app = Flask(__name__)
where app.py is the app’s name
function to create & render an html page called index
@app.route(“/”)
def index():
return render_template(“index.html”)
what are decorators?
they define the type of thing the function is
create a var called name in the index function & assign it a value
name = request.args.get(“name”)
return render_template(“index.html”, name=name)
placeholder for vars
{{ var }}
how to get input from the user?
forms
how to use forms in html
<form>
<input></input>
</form>