Wichert Akkerman wrote:
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.
It only works if the context is wrapped properly. :)
Wichert.
Andrew
_______________________________________________
Zope-CMF maillist - Zope-CMF@lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf
See http://collector.zope.org/CMF for bug reports and feature requests