summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wk9/lect/froshims/app.py6
-rw-r--r--wk9/lect/froshims/templates/index.html2
2 files changed, 7 insertions, 1 deletions
diff --git a/wk9/lect/froshims/app.py b/wk9/lect/froshims/app.py
index de6ec44..f083e51 100644
--- a/wk9/lect/froshims/app.py
+++ b/wk9/lect/froshims/app.py
@@ -5,3 +5,9 @@ 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"):
+ return "failure"
diff --git a/wk9/lect/froshims/templates/index.html b/wk9/lect/froshims/templates/index.html
index 53b5941..d9920da 100644
--- a/wk9/lect/froshims/templates/index.html
+++ b/wk9/lect/froshims/templates/index.html
@@ -4,7 +4,7 @@
<h1>Register</h1>
<form action="/register" method="post">
- <input autocomplete="off" required autofocus name="name" placeholder="Name" type="text">
+ <input autocomplete="off" autofocus name="name" placeholder="Name" type="text">
<select name="sport">
<option disabled selected value="">Sport</option>
<option>Basketball</option>