From a2fb06b6004377b99acae44025b607c68de4a1cb Mon Sep 17 00:00:00 2001 From: Matt Huntington Date: Thu, 5 Jan 2023 16:39:38 -0500 Subject: [PATCH] basics --- server.py | 14 ++++++++++++++ templates/show.html | 19 +++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 server.py create mode 100644 templates/show.html diff --git a/server.py b/server.py new file mode 100644 index 0000000..5c642ba --- /dev/null +++ b/server.py @@ -0,0 +1,14 @@ +from flask import Flask, render_template, request + +app = Flask(__name__) + +@app.get("/") +def show(): + return render_template('show.html') + +@app.post("/") +def create(): + return { + 'title':request.form['title'], + 'description':request.form['description'] + } diff --git a/templates/show.html b/templates/show.html new file mode 100644 index 0000000..ebd4102 --- /dev/null +++ b/templates/show.html @@ -0,0 +1,19 @@ + + + + + + + + + +
+ + + +
+ +