[Zope3-checkins] CVS: Zope3/src/zope/app/http - delete.py:1.4

Jim Fulton jim at zope.com
Sun Sep 21 13:32:48 EDT 2003


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

Modified Files:
	delete.py 
Log Message:
No longer use context wrappers or the zope container adapter.


=== Zope3/src/zope/app/http/delete.py 1.3 => 1.4 ===
--- Zope3/src/zope/app/http/delete.py:1.3	Mon Jun 23 13:17:04 2003
+++ Zope3/src/zope/app/http/delete.py	Sun Sep 21 13:32:16 2003
@@ -18,9 +18,7 @@
 __metaclass__ = type
 
 from zope.component import getAdapter
-from zope.context import getWrapperContainer, getWrapperData
 from zope.app.interfaces.file import IWriteDirectory
-from zope.app.interfaces.container import IZopeWriteContainer
 
 class DELETE:
     """Delete handler for all objects
@@ -34,17 +32,13 @@
         request = self.request
 
         victim = self.context
-        container = getWrapperContainer(victim)
-        name = getWrapperData(victim)['name']
+        container = victim.__parent__
+        name = victim.__name__
 
 
         # Get a "directory" surrogate for the container
         dir = getAdapter(container, IWriteDirectory)
 
-        # Get the zope adapter for that
-        dir = getAdapter(dir, IZopeWriteContainer)
-
-        # Now do the delete
         del dir[name]
 
         return ''




More information about the Zope3-Checkins mailing list