setup-env ()

This event is emitted right after the plugin was initialized and associated with the environment. This can be used to reconfigure it. For instance this is the perfect place to inject Jinja 2 filters and global variables.

Example

def on_setup_env(self, **extra):
    self.env.jinja_env.globals['my_variable'] = 'my value'

Plugins That Use This Event

Comments