costa-vite-myna/core/staticdir.py

10 lines
255 B
Python
Raw Normal View History

2024-05-12 02:18:32 +07:00
from bottle import Bottle, get, static_file
from config import directory
app = Bottle()
for items in directory.static:
@app.get(items['route'])
def static_items(filepath):
return static_file(filepath, root=items['root'])