Commit ae230c7f authored by Evan Simpson's avatar Evan Simpson

Change the __call__ signature to all use of ZPTs as ZClass constructors.

parent da4af7a5
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
HTML- and XML-based template objects using TAL, TALES, and METAL. HTML- and XML-based template objects using TAL, TALES, and METAL.
""" """
__version__='$Revision: 1.3 $'[11:-2] __version__='$Revision: 1.4 $'[11:-2]
import os, sys, traceback import os, sys, traceback
from TAL.TALParser import TALParser from TAL.TALParser import TALParser
...@@ -154,7 +154,9 @@ class PageTemplate: ...@@ -154,7 +154,9 @@ class PageTemplate:
html=self.html() )() html=self.html() )()
return output.getvalue() return output.getvalue()
def __call__(self, **kwargs): def __call__(self, *args, **kwargs):
if not kwargs.has_key('args'):
kwargs['args'] = args
return self.pt_render(extra_context={'options': kwargs}) return self.pt_render(extra_context={'options': kwargs})
def pt_errors(self): def pt_errors(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment