Myles English wrote:
I am getting on so well with what I have now as a result of virtualenv
and zopeproject0.4 that I don't want to break it by mistake so I am
asking people who know.

On the sandbox I had before, I edited zope.conf to start an ftp server
as well as http on startup.  This was necessary to upload files
(jpegs) created external to zope.

How do I install and start an ftp server within the zopeproject/buildout/paste?

The short answer is: You don't.

The long answer: WSGI is HTTP only. Paste is just a way to stack WSGI components (gatway, middlewares, application) via a configuration file. It has no support for FTP. I currently have no plans to bring FTP to the zopeproject story, though I might change my mind if enough people ask for it.

That said, I think WebDAV (which works over HTTP) is an adequate alternative to FTP. I guess there might be edge cases where you *really* need FTP, otherwise WebDAV should suit you just as well if not better.

To enable WebDAV, add the following two directives to your configure.zcml:

  <include package="zope.app.dav" file="meta.zcml" />
  <include package="zope.app.dav" />

and don't forget to add 'zope.app.dav' to the dependencies in setup.py. Then run bin/buildout and start the application again.

I haven't tried using z3c.dav instead, which is a much richer WebDAV implementation for Zope 3, but I suspect it would work just as well.

Added this to buildout.cfg:

    [app]
    eggs = ...
                zope.app.ftp

...and this to setup.py...

    setup(
               install_requires=[ ...
                                           'zope.app.ftp'
               ]
    )

You shouldn't have to do both to make sure a package is installed. One of them is enough. Adding it to setup.py (install_requires) means that the package is an integral, intrinsic dependency of your code. Adding it to buildout.cfg means it's something that's needed for this particular deployment.

Anyway, you won't need zope.app.ftp as it can't be used by a zopeproject-generated sandbox.


--
http://worldcookery.com -- Professional Zope documentation and training

_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users

Reply via email to