A root factory is a callable that accepts an environ and returns a root object.

- C

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
> factory(environ).
> _______________________________________________
> Repoze-dev mailing list
> Repoze-dev@lists.repoze.org
> http://lists.repoze.org/listinfo/repoze-dev
>

_______________________________________________
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev

Reply via email to