[Zope-CVS] CVS: Packages/Moztop/moztopsupport/dav - configure.zcml:1.5 propfind.py:1.5 views.py:1.3

Sidnei da Silva sidnei@x3ng.com.br
Mon, 24 Mar 2003 17:23:35 -0500


Update of /cvs-repository/Packages/Moztop/moztopsupport/dav
In directory cvs.zope.org:/tmp/cvs-serv20239/dav

Modified Files:
	configure.zcml propfind.py views.py 
Log Message:
Its broken with Zope3 HEAD now, but its working with my local fixes and I can actually connect to Zope3 with cadaver! Pending the response of my email to zope3-dev

=== Packages/Moztop/moztopsupport/dav/configure.zcml 1.4 => 1.5 ===
--- Packages/Moztop/moztopsupport/dav/configure.zcml:1.4	Mon Mar 24 16:12:00 2003
+++ Packages/Moztop/moztopsupport/dav/configure.zcml	Mon Mar 24 17:23:04 2003
@@ -1,5 +1,4 @@
-<zopeConfigure xmlns='http://namespaces.zope.org/zope'
-               xmlns:browser='http://namespaces.zope.org/browser'>
+<zopeConfigure xmlns='http://namespaces.zope.org/zope'>
 
   <view for="*"
  	name="PROPFIND"
@@ -9,31 +8,35 @@
 	allowed_attributes="PROPFIND"
   />
 
-  <browser:page
+  <view
     for="zope.app.interfaces.content.zpt.IZPTPage"
+    type="zope.publisher.interfaces.http.IHTTPPresentation"
     name="DAVsource"
-    class=".views.ZPTDAVSource"
+    factory=".views.ZPTDAVSource"
     permission="zope.ManageContent"
     />
 
-  <browser:page
+  <view
     for="*"
     name="DAVdisplayname"
-    class=".views.DAVDisplayName"
+    type="zope.publisher.interfaces.http.IHTTPPresentation"
+    factory=".views.DAVDisplayName"
     permission="zope.Public"
     />
 
-  <browser:page
+  <view
     for="*"
     name="DAVcreationdate"
-    class=".views.DAVCreationDate"
+    type="zope.publisher.interfaces.http.IHTTPPresentation"
+    factory=".views.DAVCreationDate"
     permission="zope.Public"
     />
 
-  <browser:page
+  <view
     for="*"
     name="DAVresourcetype"
-    class=".views.DAVResourceType"
+    type="zope.publisher.interfaces.http.IHTTPPresentation"
+    factory=".views.DAVResourceType"
     permission="zope.Public"
     />
 


=== Packages/Moztop/moztopsupport/dav/propfind.py 1.4 => 1.5 ===
--- Packages/Moztop/moztopsupport/dav/propfind.py:1.4	Mon Mar 24 16:12:00 2003
+++ Packages/Moztop/moztopsupport/dav/propfind.py	Mon Mar 24 17:23:04 2003
@@ -17,6 +17,7 @@
 
 from xml.dom import minidom
 from zope.component import getAdapter, getView, queryView
+from zope.proxy.introspection import removeAllProxies
 
 from moztopsupport.dav.interfaces import IDAVSource
 
@@ -76,6 +77,7 @@
             if view is None:
                 not_avail.append(tagname)
             else:
+                view = removeAllProxies(view)
                 response += str(view)
 
         if response:
@@ -91,10 +93,7 @@
         return body
 
     def _buildBody(self, response):
-        try:
-            resource_url = str(getView(self.context, 'absolute_url', self.request))
-        except:
-            resource_url = 'foo'
+        resource_url = str(getView(self.context, 'absolute_url', self.request))
         return self._xml % ({'resource_url':resource_url,
                              'response':response})
 
@@ -113,7 +112,7 @@
             result += '<D:%s />' % p
         return result
 
-    def _buildOK(self, response):
+    def _buildOk(self, response):
         return self._ok_xml % {'response':response}
 
     _ok_xml = '''<D:propstat>


=== Packages/Moztop/moztopsupport/dav/views.py 1.2 => 1.3 ===
--- Packages/Moztop/moztopsupport/dav/views.py:1.2	Mon Mar 24 16:12:00 2003
+++ Packages/Moztop/moztopsupport/dav/views.py	Mon Mar 24 17:23:04 2003
@@ -1,4 +1,4 @@
-from zope.component import getView, getAdapter
+from zope.component import getView, getAdapter, queryAdapter
 from zope.app.interfaces.traversing import IObjectName
 from zope.app.interfaces.dublincore import IDCTimes
 from zope.app.interfaces.container import IReadContainer