# HG changeset patch # User sean # Date 1438165646 -7200 # Node ID d71f39618d6ff4a003c53e310a2131613a4d6390 # Parent b06cb7fbf7f8c3c72ed35d44cdb2fba40ff6fedd used another workaround to locate the correct template diff -r b06cb7fbf7f8 -r d71f39618d6f dash.py --- a/dash.py Wed Jul 29 12:20:08 2015 +0200 +++ b/dash.py Wed Jul 29 12:27:26 2015 +0200 @@ -6,7 +6,7 @@ from bottle import get, post, request, view, response, route from bottle import template, run, static_file, error -import os.path,sys,configparser +import os.path,sys,configparser,functools,bottle CONFIG_FILE = "dash.conf" PATH = os.path.abspath(os.path.dirname(sys.argv[0])) @@ -14,7 +14,7 @@ # Create a new list with absolute paths MY_TEMPLATE_PATH = [ - PATH, './views')), + os.path.abspath(os.path.join(os.path.dirname(__file__), './views')), ] # Patch @view() so it uses the customized path list instead of the global one @@ -24,7 +24,7 @@ settings = {} default_settings = configparser.ConfigParser() -default_settings['settings'] = {'show_top_bar': True} +default_settings['settings'] = {'show_top_bar': False} ##read the config file. usually "dash.conf"