summaryrefslogtreecommitdiff
path: root/wk9/lect/hello/app.py
blob: 635671dcfb816e7636c800cba0723839c54497c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
from flask import Flask, render_template, request

app = Flask(__name__)

@app.route("/")
def index():
    return render_template("index.html")


@app.route("/greet")
def greet():
    name = request.args.get("name", "world")
    return render_template("greet.html", name=name)