[Zope] Call PageTemplateFile class instances

Peter Bengtsson peter at fry-it.com
Thu Nov 13 12:27:15 EST 2008


2008/11/13 Andreas Jung <lists at zopyx.com>:
> On 13.11.2008 17:53 Uhr, Peter Bengtsson wrote:
>>
>> This used to work in zope 2.8 but not now in zope 2.10 (actually zope
>> 2.10.7 to be exact)
>>
>> from Products.PageTemplates.PageTemplateFile import PageTemplateFile
>> class MyProduct(Folder):
>>     meta_type = "bla"
>>     page = PageTemplateFile('zpt/foo.pt', globals())
>>
>>     def render_page(self):
>>          html = self.page(self.REQUEST) # ERROR!!
>
> Are you sure that you don't have to pass the REQUEST as a keyword parameter?
>
No difference if I pass REQUEST or not.  :(

> -aj
>
> _______________________________________________
> Zope maillist  -  Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )
>
>



-- 
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com


More information about the Zope mailing list