bag.web.pyramid.kajiki module

Kajiki integration for Pyramid.

This module allows the Kajiki templating language – http://pypi.python.org/pypi/Kajiki/ – to be used in the Pyramid web framework – http://docs.pylonshq.com/

To enable the pyramid_kajiki extension, do this:

config.include('bag.web.pyramid.kajiki')

Once the template loader is active, add the following to the application section of your Pyramid application’s .ini file:

[app:yourapp]
# ... other stuff ...
kajiki.directory = myapp:templates
kajiki.extensions = .kajiki .genshi .html

The Kajiki FileLoader class supports searching only one directory for templates. If you want a search path, you must roll your own. If you do… let us know.

class bag.web.pyramid.kajiki.KajikiTemplateRenderer(info)[source]

Bases: object

implementation()[source]
bag.web.pyramid.kajiki.includeme(config)[source]

Set up Kajiki templating for the configured file extensions.

bag.web.pyramid.kajiki.renderer_factory(info)[source]

info contains:

name = Attribute('The value passed by the user as the renderer name')
package = Attribute('The "current package" when the renderer '
                    'configuration statement was found')
type = Attribute('The renderer type name')
registry = Attribute('The "current" application registry when the '
                     'renderer was created')
settings = Attribute('The ISettings dictionary related to the '
                     'current app')