[Zope3-checkins] CVS: Zope3/src/zope/app/component - metaconfigure.py:1.33

Stephan Richter srichter at cosmos.phy.tufts.edu
Sat Mar 20 12:10:56 EST 2004


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

Modified Files:
	metaconfigure.py 
Log Message:


Removed functionality that defaultView can also create a view.




=== Zope3/src/zope/app/component/metaconfigure.py 1.32 => 1.33 ===
--- Zope3/src/zope/app/component/metaconfigure.py:1.32	Thu Mar 18 07:19:22 2004
+++ Zope3/src/zope/app/component/metaconfigure.py	Sat Mar 20 12:10:55 2004
@@ -287,19 +287,13 @@
                     args = ('', iface)
                     )
 
-def defaultView(_context, type, name, for_, **__kw):
+def defaultView(_context, type, name, for_):
 
-    if __kw:
-        view(_context, type=type, name=name, for_=for_, **__kw)
-
-    if len(for_) == 1:
-        _context.action(
-            discriminator = ('defaultViewName', for_[0], type, name),
-            callable = handler,
-            args = (Presentation, 'setDefaultViewName', for_[0], type, name),
-            )
-    else:
-        raise TypeError("Can't use multiple for in defaultView")
+    _context.action(
+        discriminator = ('defaultViewName', for_, type, name),
+        callable = handler,
+        args = (Presentation, 'setDefaultViewName', for_, type, name),
+        )
     
     _context.action(
         discriminator = None,




More information about the Zope3-Checkins mailing list