Local site adapter registrations

Martin Aspeli optilude at gmx.net
Thu Aug 30 07:25:27 UTC 2007


sirgarr wrote:
> Hi,
> 
> How do I (as a developer) see what's going on with local registration? In
> python code I can register a local adapter, utility, etc. -- but down the
> road, how can I peak into a local site and see what the local registrations
> are? How can I undo this later on? It seems like a black box where I
> register things and then might forget what I ever did there!

You can get the current local site manager using 
zope.app.component.hooks.getSite() (presuming you're inside a Plone site 
and that some traversal over the site root happened). Look at 
zope.component.interfaces to see what you can do with that object. :)

Martin

-- 
Acquisition is a jealous mistress





More information about the Product-Developers mailing list