0
|
1 from bottle import get, post, request, view, response, route, template, run, static_file, error |
|
2 |
|
3 @route('/') |
|
4 @view('hello_template') |
|
5 def call_dashboard(): |
|
6 return dict() |
|
7 |
|
8 @route('/config') |
|
9 def call_config(): |
|
10 return 'Not implemented yet' |
|
11 |
|
12 |
|
13 @route('/static/<filepath:path>') |
|
14 def server_static(filepath): |
|
15 return static_file(filepath, root='./static_files/') |
|
16 |
|
17 @error(404) |
|
18 def error404(error): |
|
19 return 'Nothing here, sorry <br /> 404' |
|
20 |
|
21 |
|
22 run(host='localhost', port=8080, debug=True) |