Mercurial > bottledash
diff dash.py @ 9:b06cb7fbf7f8
updated template paths for daemon usage
author | sean |
---|---|
date | Wed, 29 Jul 2015 12:20:08 +0200 |
parents | 8fc4db85f2f5 |
children | d71f39618d6f |
line wrap: on
line diff
--- a/dash.py Wed Jul 29 12:02:51 2015 +0200 +++ b/dash.py Wed Jul 29 12:20:08 2015 +0200 @@ -12,6 +12,14 @@ PATH = os.path.abspath(os.path.dirname(sys.argv[0])) CONFIG_PATH = PATH + "/" + CONFIG_FILE +# Create a new list with absolute paths +MY_TEMPLATE_PATH = [ + PATH, './views')), +] + +# Patch @view() so it uses the customized path list instead of the global one +view = functools.partial(bottle.view, template_lookup=MY_TEMPLATE_PATH) + tiles = [] settings = {} @@ -140,4 +148,4 @@ read_config() # print(tiles) -# run(host='localhost', port=8080, debug=True) +run(host='localhost', port=8080, debug=True)