[Zope] using a DTMLFile in a python product method

Casey Duncan cduncan@kaivo.com
Wed, 20 Jun 2001 10:20:32 -0600


Matthew Wilbert wrote:
> 
> I have a method in a python product where I return different
> forms based upon a REQUEST parameter.  If I construct the returned html as a python string and return it, it works fine.  But it seems more sensible to save the html as a template and then return that.  So I created a template file, and used it to create a DTMLFile instance.  The problem is that if I return this instance, it is returned html-quoted, which isn't what I want.  Looking at the code, I can see this is the expected behavior if you convert it to string, but that isn't being done, explicitly.at least.
> 
> Anyone know how to get it to show up unquoted?
> 
> Matt Wilbert
> mwilbert@alum.mit.edu

It would seem you are returning the DTMLFile object itself. I would
suggest returning the rendered result of the object instead by calling
it and returning the resulting data.

-- 
| Casey Duncan
| Kaivo, Inc.
| cduncan@kaivo.com
`------------------>