Woohoo! It works! Thanks a bunch, now to incorporate it into the ZClass interface..... KH -----Original Message----- From: Brian Lloyd <Brian@digicool.com> To: 'Kevin Howe' <ap619@chebucto.ns.ca>; Brian Lloyd <Brian@digicool.com>; alex@mop.no <alex@mop.no> Cc: zope@zope.org <zope@zope.org> Date: November 2, 1999 5:46 PM Subject: RE: [Zope] Renderable Base ZClass
This solves the REQUEST problem, but an error then occurs with the DTML <!--#in object--> tag, which is the next tag down in the DTML method.
How can I enable DTML tag parsing, for "in", "with", and other tags tags? Is it just a matter of passing the right arguments?
The script and the error traceback are included below.
Cheers Kevin
SCRIPT -------------------------------------- import Acquisition
class Renderable: def __str__(self): theRequest=self.REQUEST if theRequest: theObject = getattr(self, 'render') return theObject(theRequest) else: return "no request"
I believe you just need to tweak the way that you are calling theObject - I'm assuming its a DTML method/document. try:
def __str__(self): theRequest=self.REQUEST if theRequest: theObject = getattr(self, 'render') # When calling a dtml method/document, you pass the # 'client' of the method, followed by a mapping of # values (usually the REQUEST)... return theObject(self, theRequest) else: return "no request"
Let me know if this fixes it.
Brian Lloyd brian@digicool.com Software Engineer 540.371.6909 Digital Creations http://www.digicool.com