[Checkins] SVN: five.grok/branches/sylvain-static-and-forms/src/five/grok/components.py - Say that getPhysicalPath is acquired on a View, so static work without having to inherit from Acquisition.Implicit, which makes things worse.

Sylvain Viollon sylvain at infrae.com
Wed Sep 3 05:36:10 EDT 2008


Log message for revision 90738:
  
  - Say that getPhysicalPath is acquired on a View, so static work without having to inherit from Acquisition.Implicit, which makes things worse.
  
  

Changed:
  U   five.grok/branches/sylvain-static-and-forms/src/five/grok/components.py

-=-
Modified: five.grok/branches/sylvain-static-and-forms/src/five/grok/components.py
===================================================================
--- five.grok/branches/sylvain-static-and-forms/src/five/grok/components.py	2008-09-03 09:15:22 UTC (rev 90737)
+++ five.grok/branches/sylvain-static-and-forms/src/five/grok/components.py	2008-09-03 09:36:10 UTC (rev 90738)
@@ -28,7 +28,7 @@
     interface.implements(IAttributeAnnotatable, IContext)
 
 
-class View(grokcore.view.View, Acquisition.Implicit):
+class View(grokcore.view.View, Acquisition.Explicit):
 
     def __init__(self, *args):
         super(View, self).__init__(*args)
@@ -38,7 +38,11 @@
             # resources.
             self.static = self.static.__of__(self)
 
+    # We let getPhysicalPath to be acquired. This make static URL's
+    # work, and prevent us to inherit from Acquisition.Implicit
+    getPhysicalPath = Acquisition.Acquired
 
+
 # TODO: This should probably move to Products.Five.browser
 
 class ViewAwareZopePageTemplate(ZopePageTemplate):



More information about the Checkins mailing list