[Zope-dev] Stacking zope.component registries

Stephan Richter srichter at cosmos.phy.tufts.edu
Thu Apr 8 21:37:35 EDT 2010


On Thursday 08 April 2010, Martin Aspeli wrote:
> Can you elaborate on what you mean here?

So I think this can all be done independently of base registry (unless you are 
are planning to store the registry in the ZODB).

The key for layering is the ability to inherit components using the __bases__ 
attribute (see registry.py). So something like:

reg1 = Components('reg1') # Registry for layer 1

Then for the next layer that is based on layer 1, you can do:

reg2 = Components('reg2', (reg1,)) # Registry for layer 2

This should behave identically to how ZODB storage layering works.

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


More information about the Zope-Dev mailing list