Commit 9077eb18 authored by Marcel Rieger's avatar Marcel Rieger
Browse files

Merge extension config into app config.

parent e4dbe7fd
......@@ -52,6 +52,9 @@ class AbstractExtension(object):
raise NotImplementedError
def config(self):
return {}
def add_controller(self, controller):
Mount a CherryPy controller using the extension name for path.
......@@ -294,9 +297,14 @@ class Server(object):"load extensions")
script_name = vispa.url.dynamic('/', encoding='utf-8')"mount app")
self.__application = cherrypy.tree.mount(self.controller, script_name,
app_config = self.__default_mount_config
# merge extension config into app config
for extension in self._extensions.values():
app_config["/extensions/" +] = extension.config()
self.__application = cherrypy.tree.mount(self.controller, script_name, app_config)
if os.path.isfile(cherrypy_conf):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment