Mercurial > bottledash
diff dash.py @ 0:e1264e58154c
initial commpit
author | sean |
---|---|
date | Sun, 12 Jul 2015 17:59:32 +0200 |
parents | |
children | 3f5bcad45756 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dash.py Sun Jul 12 17:59:32 2015 +0200 @@ -0,0 +1,22 @@ +from bottle import get, post, request, view, response, route, template, run, static_file, error + +@route('/') +@view('hello_template') +def call_dashboard(): + return dict() + +@route('/config') +def call_config(): + return 'Not implemented yet' + + +@route('/static/<filepath:path>') +def server_static(filepath): + return static_file(filepath, root='./static_files/') + +@error(404) +def error404(error): + return 'Nothing here, sorry <br /> 404' + + +run(host='localhost', port=8080, debug=True)