[Zope] - Understanding DTML processing

Paulo Eduardo Neves neves@inf.puc-rio.br
Fri, 22 Jan 1999 23:21:25 -0300


John Eikenberry wrote:
> 
> On Fri, 22 Jan 1999, Paulo Eduardo Neves wrote:
> 
> > If so, what should I return from process() to make it have the same
> > output of template_html?
> 
> try this:
> 
>         def process(self, REQUEST):
>         """Process the product and return the template"""
>                 #process something here
>                 return self.template_html(self,REQUEST)
> 
> It works this way because - "HTMLFile('template')" - returns a callable
> object (it masquerades as a method) that takes (and requires) arguments.
> The arguements are automatically supplied by ZPublisher when calling
> "template_html", but you didn't provide them when returning it from
> "process".
> 
> Make sense? :)

I know that it returns a callable object and that it needs an argument.
But remember that self.template_html() is the same as
template_html(self), self.template_html(self) would be the same as
template_html(self, self)!. It looks redundant. 

But now I'm on the right track again.

Thanks very much you and Pavlos for the help.

regards,
-- 
Paulo Eduardo Neves
PUC-Rio de Janeiro 
Pager: Central: 292-4499 cod. 213 99 64
ou use a URL:  http://www.learn.fplf.org.br/neves/mensagempager.html