From fd9ee5dcdccafd9087565c09962502382ccc2d2e Mon Sep 17 00:00:00 2001 From: Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> Date: Tue, 9 Jul 2024 09:30:19 +0000 Subject: Tue, Jul 9, 2024, 2:30 AM -07:00 --- wk9/lect/froshims/app.py | 7 +++++++ wk9/lect/froshims/templates/index.html | 16 ++++++++++++++++ wk9/lect/froshims/templates/layout.html | 11 +++++++++++ 3 files changed, 34 insertions(+) create mode 100644 wk9/lect/froshims/app.py create mode 100644 wk9/lect/froshims/templates/index.html create mode 100644 wk9/lect/froshims/templates/layout.html (limited to 'wk9/lect/froshims') 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> -- cgit v1.2.3