[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/OFS/ZPTPage - ZPTPageEval.py:1.1.2.2
Jim Fulton
jim@zope.com
Tue, 26 Mar 2002 16:26:25 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/ZPTPage
In directory cvs.zope.org:/tmp/cvs-serv7731/Zope/App/OFS/ZPTPage
Modified Files:
Tag: Zope-3x-branch
ZPTPageEval.py
Log Message:
Merged the publication refactoring branch into the main branch.
Also renamed:
browser_reaverse -> publishTraverse
browser_default -> browserDefault
=== Zope3/lib/python/Zope/App/OFS/ZPTPage/ZPTPageEval.py 1.1.2.1 => 1.1.2.2 ===
try:
- self.REQUEST.RESPONSE.setHeader('content-type',
+ self.REQUEST.getResponse().setHeader('content-type',
self.getContect.content_type)
except AttributeError:
pass
@@ -57,10 +57,12 @@
return self.getContext().pt_render(extra_context=bound_names)
- def document_src(self, REQUEST=None, RESPONSE=None):
+ def document_src(self, REQUEST=None):
"""Return expanded document source."""
- if RESPONSE is not None:
- RESPONSE.setHeader('Content-Type', self.content_type)
+
+ if REQUEST is not None:
+ response = REQUEST.getResponse()
+ response.setHeader('Content-Type', self.content_type)
return self.read()