Mercurial > bottledash
comparison dash.py @ 5:c49f7fe82743
changed the grid layout to a more responsive and compatible self-calculating JS based version
author | sean |
---|---|
date | Wed, 22 Jul 2015 10:25:27 +0200 |
parents | 3e66e2f92770 |
children | c8cb2aa0b72c |
comparison
equal
deleted
inserted
replaced
4:3e66e2f92770 | 5:c49f7fe82743 |
---|---|
17 if os.path.isfile(CONFIG_FILE) == False: | 17 if os.path.isfile(CONFIG_FILE) == False: |
18 write_default_config() | 18 write_default_config() |
19 | 19 |
20 config = configparser.ConfigParser() | 20 config = configparser.ConfigParser() |
21 config.read(CONFIG_FILE) | 21 config.read(CONFIG_FILE) |
22 | |
23 | |
22 | 24 |
23 #read the tiles | 25 #read the tiles |
24 read_tiles_config(config) | 26 read_tiles_config(config) |
25 | 27 |
26 def read_tiles_config(config): | 28 def read_tiles_config(config): |
68 source=192.168.2.1 | 70 source=192.168.2.1 |
69 status=up | 71 status=up |
70 """) | 72 """) |
71 file.close() | 73 file.close() |
72 | 74 |
73 | |
74 ##Bottle | 75 ##Bottle |
75 @route('/') | 76 @route('/') |
76 @view('hello_template') | 77 @view('hello_template') |
77 def call_dashboard(): | 78 def call_dashboard(): |
78 return dict(tiles=tiles) | 79 return dict(tiles=tiles) |