Set up standard configurator registrations. Use via:
config = Configurator()
config.include('pyramid_jinja2')
Once this function has been invoked, the .jinja2 renderer is available for use in Pyramid and these new directives are available as methods of the configurator:
This function is added as a method of a Configurator, and should not be called directly. Instead it should be called like so after pyramid_jinja2 has been passed to config.include:
config.add_jinja2_renderer('.html', settings_prefix='jinja2.')
It will register a new renderer, loaded from settings at the specified settings_prefix prefix. This renderer will be active for files using the specified extension name.
This function is added as a method of a Configurator, and should not be called directly. Instead it should be called like so after pyramid_jinja2 has been passed to config.include:
config.add_jinja2_search_path('anotherpackage:templates/')
It will add the directory or asset spec passed as searchpath to the current search path of the jinja2.Environment used by the renderer identified by name.
This function is added as a method of a Configurator, and should not be called directly. Instead it should be called like so after pyramid_jinja2 has been passed to config.include:
config.add_jinja2_extension(myext)
It will add the Jinja2 extension passed as ext to the current jinja2.Environment used by the renderer named name.
This function is added as a method of a Configurator, and should not be called directly. Instead it should be called like so after pyramid_jinja2 has been passed to config.include:
config.get_jinja2_environment()
It will return the configured jinja2.Environment for the renderer named name. Configuration is delayed until a call to config.commit() or config.make_wsgi_app(). As such, if this method is called prior to committing the changes, it may return None.
Renderer for a jinja2 template
A Jinja2 template loader that knows how to handle asset specifications.