On Tuesday 06 May 2008, kevin gill wrote:
> How can I find all Local Registries (Sites)?

You cannot easily do this, since it is hierarchical. You have two options:

1. Traverse through the object tree finding them one by one.

2. Create a catalog that indexes all sites.

> I have a simple local utility that I need to register with a global
> utility when bootstrapping the application.

For some reason this sounds like a bad idea.

> I can find my global utility since it is in the global site manager.
> I registered my sites with the base local registry. I tried using the
> IDatabaseOpenedEvent and opening the database and getting the Application
> object and the root local registry. However, the local utilities I
> instantiate  believe that they are in the global Registry.

I do not understand this paragraph.

> There is also a problem deleting a site which registered itself with a
> parent.

That would be expected. I believe the base registry add/remove code shows how 
to correctly unregister sites before deletion.

Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
Zope3-users mailing list

Reply via email to