Re: GoLive and WebDAV
On 4/2/01 6:40 AM, "Paul Everitt" <paul@digicool.com> wrote:
I'm cc'ing in Jeffrey "Mr. GoLive" Shell. Jeffrey, please respond to the Zope list with answers to Chris' questions.
Here's my shot, though, on your three points.
1) Put .html on your Zope ids. But if you're saying that we don't send back the content type on the source port, then that's gotta be a bug.
It doesn't. But one of the reasons that it doesn't is that a DTML Method can actually impersonate a lot of things, just by having the first line being: Content-type: application/x-msword DTML Methods themselves don't know that this is set until render time, so the content type WebDAV property never quite works with them. I *believe* ZPT should be architected to handle this issue better, but DTML Methods never were. This is the biggest thing though that I'd like to see fixed in the next GoLive - better content sniffing. I believe it should at least *try* to open something it doesn't recognize. But then again, if you have the items 'connect' and 'openConnection' in a folder, can you tell which one is a database connection? I'm guessing that GoLive 5 errs on the side of conservatism by trying *not* to open unrecognized objects, since WebDAV is also being used by others as a way of getting data into an object database and, like in Zope, not everything is easily rendered into something that can be edited over WebDAV.
2) I guess the answer here is the same as (1). I can't think of a better solution. Perhaps something like getting the PUT handler to look for a meta type? That way you could encode in your documents the meta_type you'd like to create. Just seems kludgy though. Hack the PUT factory in the folder, and make sure anything you stick in there is going to be of the same type (or spend some extra time on the logic).
3) Doing a "site" means creating a site file on your local box, I believe.
Regarding locks...make sure you use the latest-and-greatest in CVS. Jeffrey put lock support into the trunk, so it will be there in Zope 2.4.
Yep. You'll need the Zope trunk/ Zope 2.4 for this. If you want to make your own objects lockable, you should read over the document in the WriteLocking project at dev.zope.og: http://dev.zope.org/Wikis/DevSite/Projects/WriteLocking/BeingLockable Jeffrey P Shell, jeffrey@Digicool.com http://www.digicool.com/ | http://www.zope.org
Jeffrey P Shell wrote:
1) Put .html on your Zope ids. But if you're saying that we don't send back the content type on the source port, then that's gotta be a bug.
It doesn't. But one of the reasons that it doesn't is that a DTML Method can actually impersonate a lot of things, just by having the first line being:
Content-type: application/x-msword
Cool, so all I have to do is set the first line of all my DTML methods to: Content-type: text/html ...and GoLive will be happy?
ZPT should be architected to handle this issue better, but DTML Methods never were.
Could DTML methods be made to return text/html as the default? It seems sensible to me, 'cos 99% of the time DTML methods _do_ generate HTML, am I missing something?
This is the biggest thing though that I'd like to see fixed in the next GoLive - better content sniffing.
I think GoLive's doing okay, Zope is being a little unhelpful ;-)
open something it doesn't recognize. But then again, if you have the items 'connect' and 'openConnection' in a folder, can you tell which one is a database connection?
Content type?
2) I guess the answer here is the same as (1). I can't think of a better solution. Perhaps something like getting the PUT handler to look for a meta type?
Again, content type seems like a good bet to me, couples with file extension: text/html or .html -> DTML Method (please, not documents ;-) test/python(?) or .py -> Python Script .sql -> SQL Methods .zpt -> ZPT with the rest going to files or images. In my dreams, FTP would behave the same way... Is any of this possible without too much work?
Yep. You'll need the Zope trunk/ Zope 2.4 for this.
OK, thanks :-) I knew I saw the checkin mails but lost which branch they happened on...
If you want to make your own objects lockable, you should read over the document in the WriteLocking project at dev.zope.og:
http://dev.zope.org/Wikis/DevSite/Projects/WriteLocking/BeingLockable
Cool... Thanks for all your help :-) Chris
participants (2)
-
Chris Withers -
Jeffrey P Shell