summaryrefslogtreecommitdiff
path: root/wk9/lect/froshims
diff options
context:
space:
mode:
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>