From 7a7b2a6415e09fcaf596bad5c52fd9572633b073 Mon Sep 17 00:00:00 2001 From: Linnnus Date: Wed, 27 Mar 2024 14:20:24 +0100 Subject: Move styles and images into subfolder See the updates to the README for a description of the new layout. Note that the /static/ prefix has also been removed from URLs. It felt kind of like we were leaking implementation details. The fact that these files are staic doesn't concern the consumer of the service. --- app.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app.py') diff --git a/app.py b/app.py index ca7e5d7..cfedee5 100644 --- a/app.py +++ b/app.py @@ -8,9 +8,9 @@ app = Bottle() def index(): return template("index") -@app.route("/static/") -def server_static(filename): - return static_file(filename, root="./static/") +@app.route("//") +def server_static(type, filename): + return static_file(filename, root=f"./static/{type}/") debug(True) run(app, host='localhost', port=8080, reloader=True) \ No newline at end of file -- cgit v1.2.3