Edit me on GitHub

renderer

The renderer ZCML directive can be used to override an existing existing renderer or to add a new renderer.

Attributes

factory
A dotted Python name referencing a callable object that accepts a renderer name and returns a renderer object.
name
The renderer name, which is a string.

Examples

Registering a Non-Template Renderer

1
2
3
4
<renderer
   factory="some.renderer"
   name="mynewrenderer"
   />

Registering a Template Renderer

1
2
3
4
<renderer
   factory="some.jinja2.renderer"
   name=".jinja2"
   />

Alternatives

The pyramid.config.Configurator.add_renderer() method is equivalent to the renderer ZCML directive.

See Also

See also Adding and Changing Renderers.

Table Of Contents

Previous topic

remoteuserauthenticationpolicy

Next topic

repozewho1authenticationpolicy