[Zope3-checkins] SVN: Zope3/branches/roger-contentprovider/src/zope/contentprovider/ tests OK after separation of contentprovider stuff from viewlet

Helmut Merz helmutm at cy55.de
Thu Oct 6 14:37:13 EDT 2005


Log message for revision 38819:
  tests OK after separation of contentprovider stuff from viewlet

Changed:
  U   Zope3/branches/roger-contentprovider/src/zope/contentprovider/README.txt
  U   Zope3/branches/roger-contentprovider/src/zope/contentprovider/manager.py
  U   Zope3/branches/roger-contentprovider/src/zope/contentprovider/tales.py
  U   Zope3/branches/roger-contentprovider/src/zope/contentprovider/tests/test_doc.py

-=-
Modified: Zope3/branches/roger-contentprovider/src/zope/contentprovider/README.txt
===================================================================
--- Zope3/branches/roger-contentprovider/src/zope/contentprovider/README.txt	2005-10-06 18:29:17 UTC (rev 38818)
+++ Zope3/branches/roger-contentprovider/src/zope/contentprovider/README.txt	2005-10-06 18:37:13 UTC (rev 38819)
@@ -148,6 +148,9 @@
   </html>
 
 
+More than one View
+~~~~~~~~~~~~~~~~~~
+
   >>> class InfoViewlet(object):
   ...     def __init__(self, *args): pass
   ...     title = 'Info Viewlet'

Modified: Zope3/branches/roger-contentprovider/src/zope/contentprovider/manager.py
===================================================================
--- Zope3/branches/roger-contentprovider/src/zope/contentprovider/manager.py	2005-10-06 18:29:17 UTC (rev 38818)
+++ Zope3/branches/roger-contentprovider/src/zope/contentprovider/manager.py	2005-10-06 18:37:13 UTC (rev 38819)
@@ -33,10 +33,11 @@
     """
     zope.interface.implements(interfaces.IContentProviderManager)
 
-    def __init__(self, context, request, view):
+    def __init__(self, context, request, view, region=None):
         self.context = context
         self.request = request
         self.view = view
+        self.region = region
 
 
     def values(self, region):

Modified: Zope3/branches/roger-contentprovider/src/zope/contentprovider/tales.py
===================================================================
--- Zope3/branches/roger-contentprovider/src/zope/contentprovider/tales.py	2005-10-06 18:29:17 UTC (rev 38818)
+++ Zope3/branches/roger-contentprovider/src/zope/contentprovider/tales.py	2005-10-06 18:37:13 UTC (rev 38819)
@@ -61,9 +61,10 @@
             (context, request, view), interfaces.IContentProviderManager)
         if cpManager is None:
             cpManager = manager.DefaultContentProviderManager(
-                context, request, view)
+                context, request, view, region)
 
         providers = cpManager.values(region)
+        #providers = cpManager.values()
 
         # Insert the data gotten from the context
         data = getRegionFieldData(region, econtext)
@@ -103,9 +104,10 @@
             (context, request, view), interfaces.IContentProviderManager)
         if cpManager is None:
             cpManager = manager.DefaultContentProviderManager(
-                context, request, view)
+                context, request, view, region)
 
         provider = cpManager.__getitem__(self._name, region)
+        #provider = cpManager[self._name]
 
         # Insert the data gotten from the context
         data = getRegionFieldData(region, econtext)

Modified: Zope3/branches/roger-contentprovider/src/zope/contentprovider/tests/test_doc.py
===================================================================
--- Zope3/branches/roger-contentprovider/src/zope/contentprovider/tests/test_doc.py	2005-10-06 18:29:17 UTC (rev 38818)
+++ Zope3/branches/roger-contentprovider/src/zope/contentprovider/tests/test_doc.py	2005-10-06 18:37:13 UTC (rev 38819)
@@ -24,7 +24,7 @@
 from zope.testing.doctestunit import DocTestSuite, DocFileSuite
 from zope.app.testing import setup
 
-from zope.app.viewlet import interfaces
+from zope.contentprovider import interfaces
 
 
 class TestViewlet(object):



More information about the Zope3-Checkins mailing list