From 6d4c11f6c99d7f311ea51840c680acbb67ae71d0 Mon Sep 17 00:00:00 2001 From: Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> Date: Tue, 9 Jul 2024 10:05:59 +0000 Subject: Tue, Jul 9, 2024, 3:05 AM -07:00 --- wk9/lect/froshims/app.py | 3 +++ wk9/lect/froshims/templates/index.html | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'wk9/lect/froshims') diff --git a/wk9/lect/froshims/app.py b/wk9/lect/froshims/app.py index a60a291..caf1e5f 100644 --- a/wk9/lect/froshims/app.py +++ b/wk9/lect/froshims/app.py @@ -13,4 +13,7 @@ def index(): def register(): if not request.form.get("name") or request.form.get("sport") not in SPORTS: return render_template("failure.html") + for sport in request.form.getall("sport"): + if sport not in SPORTS: + return render_template("failure.html") return render_template("success.html") diff --git a/wk9/lect/froshims/templates/index.html b/wk9/lect/froshims/templates/index.html index de6cad2..fac926b 100644 --- a/wk9/lect/froshims/templates/index.html +++ b/wk9/lect/froshims/templates/index.html @@ -6,7 +6,7 @@
{% for sport in sports %} - {{sport}} + {{sport}} {% endfor %}
-- cgit v1.2.3