[Zope-dev] Stacking zope.component registries

Stephan Richter srichter at cosmos.phy.tufts.edu
Thu Apr 8 16:58:36 EDT 2010


On Thursday 08 April 2010, Marius Gedminas wrote:
> Someone (I'm bad with names, sorry!) recently proposed a change to
> zope.configuration that makes ZCML directives use getSiteManager()
> instead of getGlobalSiteManager(); with that patch in, Chris's example
> should make ZCML configuration register all the components into your
> stacked registry.  Although you'd have the other problem of setSite()
> having no effect on the site manager, which would break all local
> utilities and adapters in your tests.

What about using z3c.baseregistry? You can wrap the baseregistry call around 
your ZCML. This way you can create on registry per layer and then use the 
__bases__ attribute to stack them together.

Regards.
Stephan
-- 
Entrepreneur and Software Geek
Google me. "Zope Stephan Richter"


More information about the Zope-Dev mailing list