[CMF-checkins] SVN: CMF/branches/1.5/C - CMFCore.PortalContent, CMFCore.FSSTXMethod, CMFTopic.Topic,

Jens Vagelpohl jens at dataflake.org
Thu Aug 18 12:43:37 EDT 2005


Log message for revision 37990:
  - CMFCore.PortalContent, CMFCore.FSSTXMethod, CMFTopic.Topic,
    CMFDefault.SkinnedFolder: Cache headers from the Caching Policy Manager
    never got set for DTML-based skins due to the way the view template
    __call__ method was invoked. (http://www.zope.org/Collectors/CMF/374)
  
    This new fix moves the change out of FSDTMLMethod.__call__ and into
    those places that invoke it.
  

Changed:
  U   CMF/branches/1.5/CHANGES.txt
  U   CMF/branches/1.5/CMFCore/FSDTMLMethod.py
  U   CMF/branches/1.5/CMFCore/FSSTXMethod.py
  U   CMF/branches/1.5/CMFCore/PortalContent.py
  U   CMF/branches/1.5/CMFCore/tests/test_FSDTMLMethod.py
  U   CMF/branches/1.5/CMFDefault/SkinnedFolder.py
  U   CMF/branches/1.5/CMFTopic/Topic.py

-=-
Modified: CMF/branches/1.5/CHANGES.txt
===================================================================
--- CMF/branches/1.5/CHANGES.txt	2005-08-18 16:22:46 UTC (rev 37989)
+++ CMF/branches/1.5/CHANGES.txt	2005-08-18 16:43:36 UTC (rev 37990)
@@ -2,10 +2,10 @@
 
   Bug Fixes
 
-    - CMFCore.FSDTMLMethod: Cache headers from the Caching Policy Manager
-      never got set for FS DTML Methods due to the way PortalContent's
-      __call__ method called the template.
-      (http://www.zope.org/Collectors/CMF/374)
+    - CMFCore.PortalContent, CMFCore.FSSTXMethod, CMFTopic.Topic,
+      CMFDefault.SkinnedFolder: Cache headers from the Caching Policy Manager
+      never got set for DTML-based skins due to the way the view template
+      __call__ method was invoked. (http://www.zope.org/Collectors/CMF/374)
 
     - CMFCore.FSImage and FSFile: Unlike the current behavior of Zope itself,
       FSImage and FSFile would set a content-length response header for 304

Modified: CMF/branches/1.5/CMFCore/FSDTMLMethod.py
===================================================================
--- CMF/branches/1.5/CMFCore/FSDTMLMethod.py	2005-08-18 16:22:46 UTC (rev 37989)
+++ CMF/branches/1.5/CMFCore/FSDTMLMethod.py	2005-08-18 16:43:36 UTC (rev 37990)
@@ -110,11 +110,6 @@
         """Render the document given a client object, REQUEST mapping,
         Response, and key word arguments."""
 
-        # If a RESPONSE is not passed in, try to access it through the
-        # REQUEST.
-        if RESPONSE is None and REQUEST != {}:
-            RESPONSE = getattr(REQUEST, 'RESPONSE', None)
-
         self._updateFromFS()
 
         if not self._cache_namespace_keys:

Modified: CMF/branches/1.5/CMFCore/FSSTXMethod.py
===================================================================
--- CMF/branches/1.5/CMFCore/FSSTXMethod.py	2005-08-18 16:22:46 UTC (rev 37989)
+++ CMF/branches/1.5/CMFCore/FSSTXMethod.py	2005-08-18 16:43:36 UTC (rev 37990)
@@ -127,7 +127,7 @@
         template = getattr( self, 'stxmethod_view', self._default_template )
 
         if getattr( template, 'isDocTemp', 0 ):
-            posargs = ( self, REQUEST )
+            posargs = ( self, REQUEST, RESPONSE )
         else:
             posargs = ()
 

Modified: CMF/branches/1.5/CMFCore/PortalContent.py
===================================================================
--- CMF/branches/1.5/CMFCore/PortalContent.py	2005-08-18 16:22:46 UTC (rev 37989)
+++ CMF/branches/1.5/CMFCore/PortalContent.py	2005-08-18 16:43:36 UTC (rev 37990)
@@ -104,7 +104,7 @@
             method = _getViewFor(self)
 
         if getattr(aq_base(method), 'isDocTemp', 0):
-            return method(self, self.REQUEST)
+            return method(self, self.REQUEST, self.REQUEST['RESPONSE'])
         else:
             return method()
 

Modified: CMF/branches/1.5/CMFCore/tests/test_FSDTMLMethod.py
===================================================================
--- CMF/branches/1.5/CMFCore/tests/test_FSDTMLMethod.py	2005-08-18 16:22:46 UTC (rev 37989)
+++ CMF/branches/1.5/CMFCore/tests/test_FSDTMLMethod.py	2005-08-18 16:43:36 UTC (rev 37990)
@@ -66,7 +66,7 @@
         original_len = len( self.RESPONSE.headers )
         script = self._makeOne('testDTML', 'testDTML.dtml')
         script = script.__of__(self.root)
-        script(self.root, self.REQUEST)
+        script(self.root, self.REQUEST, self.RESPONSE)
         self.failUnless( len( self.RESPONSE.headers ) >= original_len + 2 )
         self.failUnless( 'foo' in self.RESPONSE.headers.keys() )
         self.failUnless( 'bar' in self.RESPONSE.headers.keys() )

Modified: CMF/branches/1.5/CMFDefault/SkinnedFolder.py
===================================================================
--- CMF/branches/1.5/CMFDefault/SkinnedFolder.py	2005-08-18 16:22:46 UTC (rev 37989)
+++ CMF/branches/1.5/CMFDefault/SkinnedFolder.py	2005-08-18 16:43:36 UTC (rev 37990)
@@ -91,7 +91,7 @@
         '''
         view = _getViewFor(self)
         if getattr(aq_base(view), 'isDocTemp', 0):
-            return view(self, self.REQUEST)
+            return view(self, self.REQUEST, self.REQUEST['RESPONSE'])
         else:
             return view()
 

Modified: CMF/branches/1.5/CMFTopic/Topic.py
===================================================================
--- CMF/branches/1.5/CMFTopic/Topic.py	2005-08-18 16:22:46 UTC (rev 37989)
+++ CMF/branches/1.5/CMFTopic/Topic.py	2005-08-18 16:43:36 UTC (rev 37990)
@@ -120,7 +120,7 @@
             method = _getViewFor(self)
 
         if getattr(aq_base(method), 'isDocTemp', 0):
-            return method(self, self.REQUEST)
+            return method(self, self.REQUEST, self.REQUEST['RESPONSE'])
         else:
             return method()  
 



More information about the CMF-checkins mailing list