[Zope-CMF] Accessing the "context"
Wichert Akkerman
wichert at wiggy.net
Tue Oct 30 11:53:36 EDT 2007
Previously Charlie Clark wrote:
>
> Am 30.10.2007 um 16:19 schrieb robert rottermann:
>
> >
> >da = getattr('my_da_or_what_ever', context, None)
getattr(context, 'my_da_or_what_ever', None) works a bit better.
> Doesn't that only work within a PythonScript? I need access from
> within a content type, ie. real Python code?
It's called acquisition and it works everywhere. Try it.
Wichert.
--
Wichert Akkerman <wichert at wiggy.net> It is simple to make things.
http://www.wiggy.net/ It is hard to make things simple.
More information about the Zope-CMF
mailing list