[Zope-CMF] Accessing the "context"
robert rottermann
robert at redcor.ch
Tue Oct 30 11:19:21 EDT 2007
Charlie Clark schrieb:
> Dear all,
>
> a simple question with hopefully a simple answer! How do I access
> objects from an object's context or hierarchy? Specifically I'd like to
> be able to access a ZopeDA connection for a site.
I
>
if you know the id of the object you are looking for beforehand you can
get it by just requesting it from the context like:
da = getattr('my_da_or_what_ever', context, None)
if da:
...
s it correct that I
> have to register this somewhere to be able to access it from a portal
> object?
>
no
hth
robert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: robert.vcf
Type: text/x-vcard
Size: 178 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope-cmf/attachments/20071030/065b9971/robert.vcf
More information about the Zope-CMF
mailing list