A root factory is a callable that accepts an environ and returns a root object.
On 7/29/09 3:15 PM, george hu wrote:
> It is said "root_factory must be a callable that accepts a ....". I
> suspect it is not accurate. Instead, the root_factory here is
> described in Glossary: " The “root factory” of an repoze.bfg
> application is called on every request sent to the application." And
> actually the user defined root_factory passed into the make_app
> doesn't have to be callable. The callable object is RoutesRootFactory
> which is called by "root=self.root_factory(environ)" in __call__
> function of Router class.
> The second point is, the user defined root_factory class must include
> a constructor which accept a parameter of environ, because its
> instance is created in RoutesRootFactory in a form of: return
> Repoze-dev mailing list
Repoze-dev mailing list