repoze.bfg.router

repoze.bfg.router.make_app(root_factory, package=None, filename='configure.zcml')

Return a Router object, representing a fully configured repoze.bfg WSGI application.

root_factory must be a callable that accepts a WSGI environment and returns a traversal root object. The traversal root returned by the root factory is the default traversal root; it can be overridden on a per-view basis. root_factory may be None, in which case a ‘default default’ traversal root is used.

package is a Python module representing the application’s package. It is optional, defaulting to None. package may be None. If package is None, the filename passed or the value in the options dictionary named configure_zcml must be a) absolute pathname to a ZCML file that represents the application’s configuration or b) a ‘specification’ in the form dotted_package_name:relative/file/path.zcml.

filename is the filesystem path to a ZCML file (optionally relative to the package path) that should be parsed to create the application registry. It defaults to configure.zcml. It can also be a ‘specification’ in the form dotted_package_name:relatve/file/path.zcml. Note that if any value for configure_zcml is passed within the options dictionary, the value passed as filename will be ignored, replaced with the configure_zcml value.

options, if used, should be a dictionary containing runtime options (e.g. the key/value pairs in an app section of a PasteDeploy file), with each key representing the option and the key’s value representing the specific option value, e.g. {'reload_templates':True}

Previous topic

repoze.bfg.paster

Next topic

repoze.bfg.scripting

This Page

Quick search