[Zope-Checkins] CVS: Zope3/lib/python/Zope/PageTemplate - PageTemplateFile.py:1.1.2.19 SimpleViewClass.py:1.1.2.6

Jim Fulton jim@zope.com
Tue, 26 Mar 2002 16:26:27 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/PageTemplate
In directory cvs.zope.org:/tmp/cvs-serv7731/Zope/PageTemplate

Modified Files:
      Tag: Zope-3x-branch
	PageTemplateFile.py SimpleViewClass.py 
Log Message:
Merged the publication refactoring branch into the main branch.

Also renamed:

  browser_reaverse -> publishTraverse

  browser_default -> browserDefault



=== Zope3/lib/python/Zope/PageTemplate/PageTemplateFile.py 1.1.2.18 => 1.1.2.19 ===
         self._v_last_read = mtime
 
-    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:
+            REQUEST.getResponse().setHeader('Content-Type', self.content_type)
         return self.read()
 
     def pt_source_file(self):


=== Zope3/lib/python/Zope/PageTemplate/SimpleViewClass.py 1.1.2.5 => 1.1.2.6 ===
     def getContext(self): return self._context
 
-    def browser_default(self, request):
+    def browserDefault(self, request):
         return self, ('index.html',)
 
-    def browser_traverse(self, request, name):
+    def publishTraverse(self, request, name):
         if name == 'index.html':
             return self.index