From fed658657935022a489515f3cb387bd9a63c82c6 Mon Sep 17 00:00:00 2001 From: Linnnus Date: Wed, 20 Mar 2024 15:28:32 +0100 Subject: Add global CSS --- app.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'app.py') diff --git a/app.py b/app.py index e8bbc8b..3d36d99 100644 --- a/app.py +++ b/app.py @@ -1,4 +1,4 @@ -from bottle import Bottle, run +from bottle import Bottle, run, static_file from bottle import jinja2_template as template app = Bottle() @@ -7,4 +7,8 @@ app = Bottle() def hello(): return template("index") +@app.route("/static/") +def server_static(filename): + return static_file(filename, root="./static/") + run(app, host='localhost', port=8080) -- cgit v1.2.3