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

app = Flask(__name__)

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

@app.route("/register", methods=["POST"])
def register():

    if not request.form.get("name") or not request.form.get("sport"):
        return render_template("failure.html")
    return render_template("success.html")