[Zope3-checkins] CVS: Zope3/src/zope/app/tests - ztapi.py:1.4

Jim Fulton jim at zope.com
Wed Dec 17 05:07:21 EST 2003


Update of /cvs-repository/Zope3/src/zope/app/tests
In directory cvs.zope.org:/tmp/cvs-serv32428/src/zope/app/tests

Modified Files:
	ztapi.py 
Log Message:
Added the ability to specify a provided interface when registering
views.


=== Zope3/src/zope/app/tests/ztapi.py 1.3 => 1.4 ===
--- Zope3/src/zope/app/tests/ztapi.py:1.3	Fri Dec  5 07:41:38 2003
+++ Zope3/src/zope/app/tests/ztapi.py	Wed Dec 17 05:06:51 2003
@@ -20,17 +20,21 @@
 from zope.component.servicenames import Presentation, Adapters, Utilities
 from zope.publisher.browser import IBrowserRequest
 
-def browserView(for_, name, factory, layer='default'):
+def browserView(for_, name, factory, layer='default',
+                providing=zope.interface.Interface):
     """Define a global browser view
     """
     s = zapi.getService(None, Presentation)
-    return s.provideView(for_, name, IBrowserRequest, factory, layer)
+    return s.provideView(for_, name, IBrowserRequest, factory, layer,
+                         providing=providing)
 
-def browserResource(name, factory, layer='default'):
+def browserResource(name, factory, layer='default',
+                    providing=zope.interface.Interface):
     """Define a global browser view
     """
     s = zapi.getService(None, Presentation)
-    return s.provideResource(name, IBrowserRequest, factory, layer)
+    return s.provideResource(name, IBrowserRequest, factory, layer,
+                             providing=providing)
 
 def setDefaultViewName(for_, name, layer='default'):
     s = zapi.getService(None, Presentation)




More information about the Zope3-Checkins mailing list