[Zope3-Users] zc.relationship or hurry.query and global intid
fbo2 at gmx.net
Sat Jan 6 14:40:40 EST 2007
On Sat, Jan 06, 2007 at 08:14:52PM +0200, Gabi Shaar wrote:
> i am trying to use zope 3.3.0
> first somebody correct me if i'm wrong.
> getUtility(IIntIds) looks for an intid utility registerd in the global site manager.
> if i supply a context, then it looks in the local site.
> i am trying to use zc.relationship and hurry.query. both seem to look for a globally
> registered intid/catalog utility (at least as i understand it). i can only wrap my brain
> around how to create a local intid/catalog utility.
> could somebody point me at a simple example of how to create the intid utility these packages
> are looking for ?
Go to the site manager:
create a IntId-Utility by selecting it from the "Add object" menu. Change to the
newly create intid, select the "Registration" tab and add a registration.
The next time, getUtility(IIntIds) should return that object.
This utility is the one thing you should create before any other object because
objects created prior to this utility will never have a unique ID.
More information about the Zope3-users