[Zope3-checkins] CVS: Zope3/src/zope/app/browser/content - zpt.py:1.3

Jim Fulton jim@zope.com
Sat, 25 Jan 2003 08:34:47 -0500


Update of /cvs-repository/Zope3/src/zope/app/browser/content
In directory cvs.zope.org:/tmp/cvs-serv27753

Modified Files:
	zpt.py 
Log Message:
Changed the index method to no longer get a REQUEST passed to it.
Instead, just use the views request attr.


=== Zope3/src/zope/app/browser/content/zpt.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/browser/content/zpt.py:1.2	Wed Dec 25 09:12:30 2002
+++ Zope3/src/zope/app/browser/content/zpt.py	Sat Jan 25 08:34:15 2003
@@ -20,13 +20,13 @@
 
 class ZPTPageEval(BrowserView):
 
-    def index(self, REQUEST=None, **kw):
+    def index(self, **kw):
         """Call a Page Template"""
 
         template = self.context
+        request = self.request
 
-        if REQUEST is not None:
-            REQUEST.response.setHeader('content-type',
-                                       template.content_type)
+        request.response.setHeader('content-type',
+                                   template.content_type)
 
-        return template.render(REQUEST, **kw)
+        return template.render(request, **kw)