[Zope3-dev] [ZPT] API of pt_getContext()

Andreas Jung lists at andreas-jung.com
Sat Dec 10 05:57:33 EST 2005


I am currently working on the integration of Zope 3 ZPTs into Zope 2. This 
works so far expect that I get an error "Macro expansion failed" when 
creating a new ZPT.

in pagetemplate/pagetemplate.py there is the following code:

    self.pt_render(self.pt_getContext(self, None), source=1)

That does not match with the interface definition:

   def pt_getContext(**kw)

and that does match with the implementation of pt_getContext() in 
pagetemplate.py:

  def pt_getContext(self, args=(), options=_default_options, **ignored)

And the original ZPT implementation of Zope 2 defines:

  def pt_getContext(self):


So my theory is that the pt_getContext() call above is wrong?!
Why passing 'self' and why 'None' as non-kw-argument? This makes no sense 
to me. What is the intention in this case?

Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope3-dev/attachments/20051210/216507f5/attachment.bin


More information about the Zope3-dev mailing list