From 2fabfb60f0dcab6106e2924caaf58790540a4064 Mon Sep 17 00:00:00 2001 From: Yarne Coppens Date: Sat, 10 Aug 2024 22:07:47 +0200 Subject: [PATCH] Created base for Flask application --- .gitignore | 2 ++ app.py | 11 +++++++++++ {styles => static}/main.css | 0 {scripts => static}/main.js | 0 index.html => templates/index.html | 4 ++-- 5 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 .gitignore create mode 100644 app.py rename {styles => static}/main.css (100%) rename {scripts => static}/main.js (100%) rename index.html => templates/index.html (85%) diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..92afa22 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +__pycache__/ +venv/ diff --git a/app.py b/app.py new file mode 100644 index 0000000..9f7b4e3 --- /dev/null +++ b/app.py @@ -0,0 +1,11 @@ +from flask import Flask, render_template + +app = Flask(__name__) + +@app.route("/") +def hello_world(): + return render_template('index.html') + +@app.route("/boardgame/") +def get_boardgame(boardgame_id): + return "

Hello, World!

" \ No newline at end of file diff --git a/styles/main.css b/static/main.css similarity index 100% rename from styles/main.css rename to static/main.css diff --git a/scripts/main.js b/static/main.js similarity index 100% rename from scripts/main.js rename to static/main.js diff --git a/index.html b/templates/index.html similarity index 85% rename from index.html rename to templates/index.html index b96473a..704d190 100644 --- a/index.html +++ b/templates/index.html @@ -6,8 +6,8 @@ Boardgame Site - - + +