[Zope] Re: [cadaver] cadaver and zope
Chris McDonough
chrism@zope.com
Sat, 08 Sep 2001 10:49:44 -0400
Use the WebDav source port option to z2.py.(-w) during Zope startup.
Then visit the port you specfy via DAV. The result will be the source
instead of the rendered version. This is a hack but it makes things
work. ;-)
Patrick Collins wrote:
> Mathieu,
> I may get into an argument with the Zope authors on this one, but in
> my opinion,
> they haven't implemented the <link> in the way most clients would
> expect.
>
>>From my reading of RFC2518, in order to edit "index_html" (in your
> example) the client (cadaver) should be able to GET AND PUT
> "index_html/document_src".
>
> It doesn't make sense to me that you'd read from
> "index_html/document_src" and then write back to "index_html". This is
> because index_html MAY actually be generated by multiple source files.
>
> The example in RFC2518 in section 13.10.1 seems to behave the way you,
> Mathieu, would prefer it to work.
>
> The spec states:
> "The source of the link (src) is typically the URI of the
> output resource on which the link is defined, and there is typically
> only one destination (dst) of the link, which is the URI where the
> unprocessed source of the resource may be accessed."
>
> I've tried to send this email to the appropriate Zope mailing lists but
> not sure if I got the right ones.
>
> I'f I'm wrong, I'd be happy for someone to explain it to me because I
> will have to implement this into PerlDAV's "dave" command-line client as
> well and would rather do it right once.
>
> Regards,
> Patrick.
>
> Mathieu Longtin wrote:
>
>>Hi,
>>
>>I'm trying to use Cadaver with Zope (www.zope.org), and the connection goes
>>well and I can download page and post new one.
>>
>>However, if I use the straight "edit" command, the page I get to edit is not
>>the source code, but rather the generated html.
>>
>>Zope allows one to get the source document, by getting
>>"index_html/document_src" instead of just "index_html".
>>
>>Problem is, if I say "edit index_html/document_src", it saves it to that
>>location as well and Zope promptly ignores it (it wants it to be saved to
>>"index_html").
>>
>>I know I would have to modify the cadaver code to make this work, but what
>>is the best way?
>>
>>- Have a cadaver options that says: if you want to edit file x, actually
>>download file x/document_src (or some other extensions for other type of
>>server)
>>
>>- Have cadaver look at the "source" property. Here is a typical zope
>>property set:
>> dav:/zope/QuickStart/> propget index_html
>> Fetching properties for `index_html': (reconnecting...done)
>> creationdate = 1970-01-01T12:00:00Z
>> displayname = index_html
>> resourcetype =
>> getcontenttype = text/html
>> getcontentlength = 1558
>> source = <link>
>> <src>/zope/QuickStart/index_html</src>
>> <dst>/zope/QuickStart/index_html/document_src</dst>
>> </link>
>>
>> supportedlock = <lockentry>
>> <lockscope><exclusive></exclusive></lockscope>
>> <locktype><write></write></locktype>
>> </lockentry>
>>
>> lockdiscovery =
>> getlastmodified = Thu, 06 Sep 2001 18:22:57 GMT
>>
>>Any suggestion?
>>
>>-Mathieu
>>
>>_______________________________________________
>>cadaver mailing list
>>cadaver@webdav.org
>>http://mailman.webdav.org/mailman/listinfo/cadaver
>>
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )
>
--
Chris McDonough Zope Corporation
http://www.zope.org http://www.zope.com
"Killing hundreds of birds with thousands of stones"