[Zope-Checkins]
SVN: Zope/branches/philikon-aq/lib/python/Products/Five/browser/providerexpression.py
Small refactoring: actually wrap in the provider in
provider.__parent__, which
Philipp von Weitershausen
philikon at philikon.de
Fri Jul 27 17:30:50 EDT 2007
Log message for revision 78394:
Small refactoring: actually wrap in the provider in provider.__parent__, which
*usually* ends up being the view, unless the provider decides otherwise.
Changed:
U Zope/branches/philikon-aq/lib/python/Products/Five/browser/providerexpression.py
-=-
Modified: Zope/branches/philikon-aq/lib/python/Products/Five/browser/providerexpression.py
===================================================================
--- Zope/branches/philikon-aq/lib/python/Products/Five/browser/providerexpression.py 2007-07-27 21:10:18 UTC (rev 78393)
+++ Zope/branches/philikon-aq/lib/python/Products/Five/browser/providerexpression.py 2007-07-27 21:30:50 UTC (rev 78394)
@@ -41,10 +41,10 @@
if provider is None:
raise cp_interfaces.ContentProviderLookupError(name)
- # A content provider's context (__parent__) is the view, not
- # the context object.
+ # Wrap the content provider's in its __parent__, whatever that
+ # may be (typically the view).
if getattr(provider, '__of__', None) is not None:
- provider = provider.__of__(view)
+ provider = provider.__of__(provider.__parent__)
# Insert the data gotten from the context
addTALNamespaceData(provider, econtext)
More information about the Zope-Checkins
mailing list