[Checkins] SVN:	five.grok/branches/sylvain-viewlets/src/five/grok/components.py	Fix for z3c.pt compatibility/without template.
    Sylvain Viollon 
    sylvain at infrae.com
       
    Wed Oct  8 09:41:01 EDT 2008
    
    
  
Log message for revision 91905:
  Fix for z3c.pt compatibility/without template.
  
  
Changed:
  U   five.grok/branches/sylvain-viewlets/src/five/grok/components.py
-=-
Modified: five.grok/branches/sylvain-viewlets/src/five/grok/components.py
===================================================================
--- five.grok/branches/sylvain-viewlets/src/five/grok/components.py	2008-10-08 13:31:22 UTC (rev 91904)
+++ five.grok/branches/sylvain-viewlets/src/five/grok/components.py	2008-10-08 13:41:00 UTC (rev 91905)
@@ -239,7 +239,7 @@
     def filter(self, viewlets):
         # Wrap viewlet in aquisition, and only return viewlets
         # accessible to the user.
-        parent = self.aq_parent
+        parent = self.context.aq_parent
         security_manager = getSecurityManager()
 
         def checkPermission(viewlet):
@@ -258,7 +258,7 @@
     def render(self):
         """See zope.contentprovider.interfaces.IContentProvider"""
         # Now render the view
-        if self.template:
+        if getattr(self, 'template', None):
             return self.template.render(self)
         else:
             return u'\n'.join([viewlet.render() for viewlet in self.viewlets])
    
    
More information about the Checkins
mailing list