Re: [Zope] Webdav and emacs, eldav, nd problem.
Does a (Script) Python object actually get created or is it another object type like DTML Document when it is initially created? As far as I can tell, it would have to be the latter, as Python Scripts don't allow you to change their content-types (at least via the ZMI). On Fri, 2005-05-20 at 17:05 +0200, Gaute Amundsen wrote: Hi. We just upgraded to Zope 2.7.5-1.fc3, python 2.3.4, and now I am having problems with authoring Script (Python) (using ssh tunnel: ssh -L 2001:localhost:8081 [EMAIL PROTECTED]) I am using emacs, using eldav, using nd. I have traced the problem to this command issued by eldav in the process of saving changes to a file. nd -S -p /localpath/script.py -a Zope http://localhost:2001/path/on/remote/server/script.py; The problem is replicated on the commandline. What happens is that the python script gets saved as Page Template with Content-Type: text/plain. ( I have tried nd's -T option, but to no avail ) As nothing else have changed, ( afaik ) I must assume there has been some changes made to zopes webdav support. Any ideas anyone? Hm.. I notice we have ExternalEditor (0.5) installed. Could this have any influence? Perhaps I will try using it :) Gaute ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Webdav and emacs, eldav, nd problem.
Gaute Amundsen wrote at 2005-5-20 17:05 +0200: We just upgraded to Zope 2.7.5-1.fc3, python 2.3.4, and now I am having problems with authoring Script (Python) (using ssh tunnel: ssh -L 2001:localhost:8081 [EMAIL PROTECTED]) I am using emacs, using eldav, using nd. I have traced the problem to this command issued by eldav in the process of saving changes to a file. nd -S -p /localpath/script.py -a Zope http://localhost:2001/path/on/remote/server/script.py; The problem is replicated on the commandline. Unfortunately, the Zope world is much more complex than WebDAV expects. WebDAV knows only two types of resources: collection resources and non-collection resources. Zope, on the other hand, knows arbitrary many resouce types: Folders, PageTemplate, PythonScripts, DTMLMethods, Files, Images, When you create a new object via WebDAV (or FTP or another filesystem oriented protocol), then Zope does not have enough information to determine which type of object it should create. Therefore, it calls a hook, the so called PUT_Factory, to determine the object type. Obviously, the PUT_Factory active in your context got it wrong. There is a HowTo around, how to set up your own PUT_Factory. Note, in a CMF/Plone context (you did not tell us your context), the PUT_Factory is called content_type_registry. -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )