annotate dash.py @ 0:e1264e58154c

initial commpit
author sean
date Sun, 12 Jul 2015 17:59:32 +0200
parents
children 3f5bcad45756
rev   line source
0
e1264e58154c initial commpit
sean
parents:
diff changeset
1 from bottle import get, post, request, view, response, route, template, run, static_file, error
e1264e58154c initial commpit
sean
parents:
diff changeset
2
e1264e58154c initial commpit
sean
parents:
diff changeset
3 @route('/')
e1264e58154c initial commpit
sean
parents:
diff changeset
4 @view('hello_template')
e1264e58154c initial commpit
sean
parents:
diff changeset
5 def call_dashboard():
e1264e58154c initial commpit
sean
parents:
diff changeset
6 return dict()
e1264e58154c initial commpit
sean
parents:
diff changeset
7
e1264e58154c initial commpit
sean
parents:
diff changeset
8 @route('/config')
e1264e58154c initial commpit
sean
parents:
diff changeset
9 def call_config():
e1264e58154c initial commpit
sean
parents:
diff changeset
10 return 'Not implemented yet'
e1264e58154c initial commpit
sean
parents:
diff changeset
11
e1264e58154c initial commpit
sean
parents:
diff changeset
12
e1264e58154c initial commpit
sean
parents:
diff changeset
13 @route('/static/<filepath:path>')
e1264e58154c initial commpit
sean
parents:
diff changeset
14 def server_static(filepath):
e1264e58154c initial commpit
sean
parents:
diff changeset
15 return static_file(filepath, root='./static_files/')
e1264e58154c initial commpit
sean
parents:
diff changeset
16
e1264e58154c initial commpit
sean
parents:
diff changeset
17 @error(404)
e1264e58154c initial commpit
sean
parents:
diff changeset
18 def error404(error):
e1264e58154c initial commpit
sean
parents:
diff changeset
19 return 'Nothing here, sorry <br /> 404'
e1264e58154c initial commpit
sean
parents:
diff changeset
20
e1264e58154c initial commpit
sean
parents:
diff changeset
21
e1264e58154c initial commpit
sean
parents:
diff changeset
22 run(host='localhost', port=8080, debug=True)
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)