diff dash.py @ 10:d71f39618d6f

used another workaround to locate the correct template
author sean
date Wed, 29 Jul 2015 12:27:26 +0200
parents b06cb7fbf7f8
children 3a9cb396905f
line wrap: on
line diff
--- 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"
 
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)