diff --git a/screenless/bureau/ihr/ihrweb.py b/screenless/bureau/ihr/ihrweb.py index 2b8ef05..087ccf0 100644 --- a/screenless/bureau/ihr/ihrweb.py +++ b/screenless/bureau/ihr/ihrweb.py @@ -1,6 +1,7 @@ # this is a web interface for simple edits to configuration or editing data # for particular bureaus import configparser +import inspect import os from bottle import Bottle, request @@ -14,11 +15,13 @@ class IhrApp(Bottle): self.route("/config/", callback=self.bureau_config) self.route("/config/", callback=self.bureau_config, method="POST") self.bureaus = [] + mpath = inspect.getfile(self.__class__) + self.tdir = os.path.dirname(mpath) def index(self): # return a list of active bureaus with links # TODO: allow (de)activation of non-essential bureaus - templfile = "web_index.html" + templfile = os.path.join(self.tdir, "web_index.html") out = """

The Screenless Office

Config Manager

@@ -36,7 +39,7 @@ class IhrApp(Bottle): def bureau_config(self, bureau): # parse the config and make it into a form - templfile = "web_config.html" + templfile = os.path.join(self.tdir, "web_config.html") template = mako.template.Template(filename=templfile) basedir = os.path.expanduser("~/.screenless") if bureau == "mgmt":