Rendering other objects with python script
Hi! I'm wondering how I can get the rendering that DocumentTemplates seem to apply automatically with Python Scripts: <dtml-var "_['testname']"> return getattr(context,"testname") gives me "<Folder instace ...>" Trying to augment it with: return getattr(context,"testname")() or return getattr(context,"testname")(request) only gives me KeyErrors too :( Andreas
Am Don, 2002-09-12 um 12.53 schrieb Andreas Kostyrka:
Hi!
I'm wondering how I can get the rendering that DocumentTemplates seem to apply automatically with Python Scripts:
<dtml-var "_['testname']">
return getattr(context,"testname")
gives me "<Folder instace ...>" Trying to augment it with: return getattr(context,"testname")() or return getattr(context,"testname")(request) Found my error. Seems it must be getattr(context,id)(context,request)
See also http://www.zope.org/Members/yacc/contextindex Andreas
participants (1)
-
Andreas Kostyrka