mirror of
https://github.com/heyarne/berliner-winter.git
synced 2026-05-06 19:23:39 +02:00
Set up serving of index.html and assets
This commit is contained in:
parent
da39c6b9dc
commit
155874f689
16 changed files with 9712 additions and 3 deletions
|
|
@ -1,6 +1,10 @@
|
|||
import bottle
|
||||
from models import *
|
||||
|
||||
@bottle.get("/")
|
||||
def index():
|
||||
return bottle.template('index')
|
||||
|
||||
@bottle.get("/locations/<article_id:int>")
|
||||
def location(article_id):
|
||||
return (Location
|
||||
|
|
@ -31,5 +35,9 @@ def article(article_id):
|
|||
# .get())
|
||||
pass
|
||||
|
||||
@bottle.get('/static/<filepath:path>')
|
||||
def server_static(filepath):
|
||||
return bottle.static_file(filepath, root='static/')
|
||||
|
||||
if __name__ == "__main__":
|
||||
bottle.run(host="localhost", port=12345, reloader=True, debug=True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue