[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/ZopePublication - PublicationTraverse.py:1.1.2.12

Gary Poster garyposter@earthlink.net
Wed, 3 Apr 2002 22:53:53 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/App/ZopePublication
In directory cvs.zope.org:/tmp/cvs-serv7752/ZopePublication

Modified Files:
      Tag: Zope-3x-branch
	PublicationTraverse.py 
Log Message:
checking in gary-pre_create_view-branch, with support for create namespace.  Because I merged in the Zope-3x-branch earlier and then had to run the license script again, many (most?) of the files were touched.  I am checking these in incrementally, since I ran into trouble overloading the cvs server when I had to do this for my own branch.  I will notate the last checkin, and then immediately check it out again to check my work.


=== Zope3/lib/python/Zope/App/ZopePublication/PublicationTraverse.py 1.1.2.11 => 1.1.2.12 ===
 from Zope.ContextWrapper import Wrapper
 
+from Zope.App.ZMI.Addable import ContentAddables
+from Zope.App.OFS.Container.IContainer import IWriteContainer
+
 class DuplicateNamespaces(Exception):
     """More than one namespave was specified in a request"""
     
@@ -149,6 +152,13 @@
             if r is None:
                 raise NotFound(ob, name, request)
         raise ExcessiveWrapping(ob, name, request)
+    
+    def _traversecreate(self, request, ob, name): 
+        for addable in ContentAddables.getAddables(ob):
+            if addable.id() == name:
+                return addable
+        raise NotFound(ob, name, request)
+        
 
 class PublicationTraverser(PublicationTraverse):