# HG changeset patch # User sean # Date 1438165208 -7200 # Node ID b06cb7fbf7f8c3c72ed35d44cdb2fba40ff6fedd # Parent 8fc4db85f2f5bc5ba09df6f9d9fc55080a82ecb0 updated template paths for daemon usage diff -r 8fc4db85f2f5 -r b06cb7fbf7f8 dash.py --- 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)