[Product-Developers] Re: Startup hook to access local utility properties

Daniel Nouri daniel.nouri at gmail.com
Thu Oct 23 09:51:14 UTC 2008


Alex Tucker writes:

> I've created a Zope local utility which stores some properties which I also
> want to get access to as part of the Zope startup process, but can't for the
> life of me figure out how to hook into this startup process in such a way
> that I can call getUtility() and get access to the registered utility.

Make sure your local component registry is active:

  >>> zope.app.component.hooks import setSite
  >>> plone = app.mysite
  >>> setSite(plone)


-- 
Daniel Nouri - http://danielnouri.org





More information about the Product-Developers mailing list