Commit 166d28b7 authored by Jim Fulton's avatar Jim Fulton

Changed to pass self as client when used as a sub-template.

parent 0253530f
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
############################################################################## ##############################################################################
"""DTML Document objects.""" """DTML Document objects."""
__version__='$Revision: 1.5 $'[11:-2] __version__='$Revision: 1.6 $'[11:-2]
from DocumentTemplate.DT_Util import InstanceDict, TemplateDict from DocumentTemplate.DT_Util import InstanceDict, TemplateDict
from ZPublisher.Converters import type_converters from ZPublisher.Converters import type_converters
from Globals import HTML, HTMLFile, MessageDialog from Globals import HTML, HTMLFile, MessageDialog
...@@ -220,7 +220,7 @@ class DTMLDocument(DTMLMethod, PropertyManager): ...@@ -220,7 +220,7 @@ class DTMLDocument(DTMLMethod, PropertyManager):
kw['document_title']=self.title kw['document_title']=self.title
if client is None: if client is None:
# Called as subtemplate, so don't need error propigation! # Called as subtemplate, so don't need error propigation!
r=apply(HTML.__call__, (self, client, REQUEST), kw) r=apply(HTML.__call__, (self, self, REQUEST), kw)
if RESPONSE is None: return r if RESPONSE is None: return r
return decapitate(r, RESPONSE) return decapitate(r, RESPONSE)
try: r=apply(HTML.__call__, (self, (client, self), REQUEST), kw) try: r=apply(HTML.__call__, (self, (client, self), REQUEST), kw)
......
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