summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFudgerboy <91767657+Fudgerboy@users.noreply.github.com>2024-07-09 09:45:52 +0000
committerFudgerboy <91767657+Fudgerboy@users.noreply.github.com>2024-07-09 09:45:52 +0000
commitbd8dbe3a8efde49e85da8ec5c9cc2d7d7d283268 (patch)
tree6d5d2f105df7319d3944914f49e1a4270843010d
parent61c45fbe6ca00c8b50fda7c531e64a108fce7206 (diff)
Tue, Jul 9, 2024, 2:45 AM -07:00
-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>