deliverance.middleware – the theming middleware

Implements the middleware that does the Deliverance transformations.

Contents

Module Contents

class deliverance.middleware.DeliveranceMiddleware(app, rule_getter, log_factory=<class 'deliverance.log.SavingLogger'>, log_factory_kw={}, default_theme=None)

The middleware that implements the Deliverance transformations

class deliverance.middleware.SubrequestRuleGetter(url)

An implementation of rule_getter for DeliveranceMiddleware. This retrieves and instantiates the rules using a subrequest with the given url.

class deliverance.middleware.FileRuleGetter(filename, always_reload=False)

An implementation of rule_getter for DeliveranceMiddleware. This reads the rules from a file.

If always_reload=True, the file will be re-read on every request.

deliverance.middleware.make_deliverance_middleware(app, global_conf, rule_uri=None, rule_filename=None, theme_uri=None, debug=None, execute_pyref=None)