[Zope3-checkins]
SVN: Zope3/branches/roger-contentprovider/src/zope/contentprovider/tales.py
Use hook for get trusted site manager
Roger Ineichen
roger at projekt01.ch
Fri Oct 7 07:38:21 EDT 2005
Log message for revision 38869:
Use hook for get trusted site manager
Changed:
U Zope3/branches/roger-contentprovider/src/zope/contentprovider/tales.py
-=-
Modified: Zope3/branches/roger-contentprovider/src/zope/contentprovider/tales.py
===================================================================
--- Zope3/branches/roger-contentprovider/src/zope/contentprovider/tales.py 2005-10-07 11:37:59 UTC (rev 38868)
+++ Zope3/branches/roger-contentprovider/src/zope/contentprovider/tales.py 2005-10-07 11:38:20 UTC (rev 38869)
@@ -18,10 +18,10 @@
__docformat__ = 'restructuredtext'
import zope.interface
import zope.component
-from zope.component.interfaces import ISiteManager
from zope.tales import expressions
from zope.interface.declarations import providedBy
+from zope.app.component.hooks import siteinfo
from zope.contentprovider import interfaces, manager
@@ -63,7 +63,7 @@
iface = interfaces.IContentProviderManager
objs = (context, request, view)
# we have to use the lookup method because region is an interface!
- lookup = ISiteManager(context).adapters.lookup
+ lookup = siteinfo.sm.adapters.lookup
cpManagerClass = lookup(map(providedBy, objs)+[region], iface, name='')
if cpManagerClass is not None:
cpManager = cpManagerClass(context, request, view, region)
@@ -114,7 +114,7 @@
iface = interfaces.IContentProviderManager
objs = (context, request, view)
# we have to use the lookup method because region is an interface!
- lookup = ISiteManager(context).adapters.lookup
+ lookup = siteinfo.sm.adapters.lookup
cpManagerClass = lookup(map(providedBy, objs)+[region], iface, name='')
if cpManagerClass is not None:
cpManager = cpManagerClass(context, request, view, region)
More information about the Zope3-Checkins
mailing list