summaryrefslogtreecommitdiff
path: root/app.py
diff options
context:
space:
mode:
authorLinnnus <[email protected]>2024-03-27 14:20:24 +0100
committerLinnnus <[email protected]>2024-03-31 15:40:19 +0200
commit7a7b2a6415e09fcaf596bad5c52fd9572633b073 (patch)
tree11b36261214bf9bbd39a418c6c64d33dafe36e56 /app.py
parent05394a2be90a0fdf8c9ab571d07ed6c4a82ce89d (diff)
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.
Diffstat (limited to 'app.py')
-rw-r--r--app.py6
1 files changed, 3 insertions, 3 deletions
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")
[email protected]("/static/<filename>")
-def server_static(filename):
- return static_file(filename, root="./static/")
[email protected]("/<type:re:styles|images>/<filename>")
+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