[Zope3-checkins] SVN: Zope3/branches/3.3/src/zope/app/component/
Make adapter easier to register from Python code (e.g. in tests)
Philipp von Weitershausen
philikon at philikon.de
Sun Jul 2 06:17:40 EDT 2006
Log message for revision 68941:
Make adapter easier to register from Python code (e.g. in tests)
Changed:
U Zope3/branches/3.3/src/zope/app/component/configure.zcml
U Zope3/branches/3.3/src/zope/app/component/site.py
-=-
Modified: Zope3/branches/3.3/src/zope/app/component/configure.zcml
===================================================================
--- Zope3/branches/3.3/src/zope/app/component/configure.zcml 2006-07-02 07:44:28 UTC (rev 68940)
+++ Zope3/branches/3.3/src/zope/app/component/configure.zcml 2006-07-02 10:17:39 UTC (rev 68941)
@@ -79,11 +79,7 @@
permission="zope.ManageContent"
/>
- <adapter
- for="zope.interface.Interface"
- provides="zope.component.interfaces.IComponentLookup"
- factory=".site.SiteManagerAdapter"
- />
+ <adapter factory=".site.SiteManagerAdapter" />
<subscriber
for=".interfaces.ISite
Modified: Zope3/branches/3.3/src/zope/app/component/site.py
===================================================================
--- Zope3/branches/3.3/src/zope/app/component/site.py 2006-07-02 07:44:28 UTC (rev 68940)
+++ Zope3/branches/3.3/src/zope/app/component/site.py 2006-07-02 10:17:39 UTC (rev 68941)
@@ -388,6 +388,8 @@
addCleanUp(clearSite)
+ at zope.component.adapter(zope.interface.Interface)
+ at zope.interface.implementer(zope.component.interfaces.IComponentLookup)
def SiteManagerAdapter(ob):
"""An adapter from ILocation to IComponentLookup.
More information about the Zope3-Checkins
mailing list