summaryrefslogtreecommitdiff
path: root/wk9/lect/froshims
diff options
context:
space:
mode:
authorFudgerboy <91767657+Fudgerboy@users.noreply.github.com>2024-07-09 09:30:19 +0000
committerFudgerboy <91767657+Fudgerboy@users.noreply.github.com>2024-07-09 09:30:19 +0000
commitfd9ee5dcdccafd9087565c09962502382ccc2d2e (patch)
treeab507ceb792f9f6edfd7daba56a07c48f488bfe0 /wk9/lect/froshims
parent308b08232f0282433905c7abe24e14080f41071b (diff)
Tue, Jul 9, 2024, 2:30 AM -07:00
Diffstat (limited to 'wk9/lect/froshims')
-rw-r--r--wk9/lect/froshims/app.py7
-rw-r--r--wk9/lect/froshims/templates/index.html16
-rw-r--r--wk9/lect/froshims/templates/layout.html11
3 files changed, 34 insertions, 0 deletions
diff --git a/wk9/lect/froshims/app.py b/wk9/lect/froshims/app.py
new file mode 100644
index 0000000..8d866f7
--- /dev/null
+++ b/wk9/lect/froshims/app.py
@@ -0,0 +1,7 @@
+from flask import Flask, render_template, request
+
+app = Flask(__name__)
+
+@app.route("/", methods=["GET", "POST"])
+def index():
+ return render_template("index.html")
diff --git a/wk9/lect/froshims/templates/index.html b/wk9/lect/froshims/templates/index.html
new file mode 100644
index 0000000..2a80486
--- /dev/null
+++ b/wk9/lect/froshims/templates/index.html
@@ -0,0 +1,16 @@
+{% extends "layout.html" %}
+
+{% block body %}
+
+ <h1>Register</h1>
+ <form action="/registeer" method="post">
+ <input autocomplete="off" autofocus name="name" placeholder="Name" type="text">
+ <select name="sport">
+ <option>Basketball</option>
+ <option>Soccer</option>
+ <option>Ultimate Frisbee</option>
+ </select>
+ <button type="submit">Register</button>
+ </form>
+
+{% endblock %}
diff --git a/wk9/lect/froshims/templates/layout.html b/wk9/lect/froshims/templates/layout.html
new file mode 100644
index 0000000..ce77036
--- /dev/null
+++ b/wk9/lect/froshims/templates/layout.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+
+<html lang="en">
+ <head>
+ <meta name="viewport" content="initial-scale=1, width=device-width">
+ <title>froshims</title>
+ </head>
+ <body>
+ {% block body %}{% endblock %}
+ </body>
+</html>