[Grok-dev] Re: Referencing objects by id

Martijn Faassen faassen at startifact.com
Mon Aug 4 17:25:38 EDT 2008


Hey,

One thing you should realize is that in Zope 3 (and therefore Grok) what 
is called 'id' in Zope 2 is actually called __name__. We call these the 
name in the container.

So if you do:

   container[my_id] = s = Something()

you can later retrieve the __name__ of the object in that container like 
this:

   s.__name__

I hope that helps!

It might also be worthwhile to investigate the NameChooser story in Zope 
3, though that isn't strictly necessary.

Regards,

Martijn



More information about the Grok-dev mailing list