Added PillarExtension.setup_app(app)

It's called on each extension after all extensions have been processed,
and after all built-in Pillar modules have had their setup_app() called.
Call order is random.
This commit is contained in:
2016-08-31 16:03:45 +02:00
parent 4cf779e040
commit 3d9b9e40d4
2 changed files with 7 additions and 0 deletions

View File

@@ -284,6 +284,10 @@ class PillarServer(Eve):
web.setup_app(self)
authentication.setup_app(self)
for ext in self.pillar_extensions.itervalues():
self.log.info('Setting up extension %s', ext.name)
ext.setup_app(self)
self._config_jinja_env()
self._config_static_dirs()

View File

@@ -62,3 +62,6 @@ class PillarExtension(object):
:rtype: dict
"""
def setup_app(self, app):
"""Called during app startup, after all extensions have loaded."""