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.


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

A list of some plugins that make use of this event is available here.