Set up serving of index.html and assets

This commit is contained in:
Arne Schlüter 2015-02-07 17:55:47 +01:00
commit 155874f689
16 changed files with 9712 additions and 3 deletions

View file

@ -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)