[Zope] LocalFS and ZPT
blossom merz
blossommerz@earthlink.net
10 Apr 2002 12:13:12 -0700
Hello, Jeff.
Thanks for your clear response. I had reached the same conclusion. Let
me explain a little more what I want to do.
I am setting up a photo server for a professional photographer. He shot
40,000 photos last year - a slow year. He has some existing php-based
gallery software that's difficult to interface with a filesystem-based
archive. He needs to have the organization happen in a series of
directories with the galleries automatically reflecting these changes.
As I make changes to the site, they are all checked into CVS (from the
commandline). I tried ZCVSfolder, and found that I'd rather use the
commandline. This is one reason to store even ZPT objects in the
filesystem.
The photos themselves are stored in the filesystem, to reduce Zope
overhead and interface with external photo organizing software.
The design of the site is happening in a WYSIWYG HTML editor - thus the
need for ZPT. Using filesystem-based ZPT objects makes this integration
seamless as well. (I'm looking at a scenario where the ZPT files exist
on a partition that's shared with Windows for easy editing by the
designer.)
I've been pointed toward the CMF Filesystem Directory View as an
alternative for LocalFS. I don't want to use the CMF. The learning curve
is too steep for what is supposed to be a fairly simple project. I was
told that I need to "register" the directory that I want to make
available, and after a week of scanning docs and reading source, I am no
closer to knowing what that means or how to do it. I'm attracted to
using the CMF because it does provide some functionality that I'll need
later on, but it seems just too difficult for me to get started.
Thanks again for you help.
blossom
On Wed, 2002-04-10 at 08:54, Jeff Peterson wrote:
> LocalFS was created before ZPT, I am pretty sure. Thus, ZPT is not a built
> in type with LocalFS and that's why it won't save. Adding the extension and
> content type to the LocalFS will not help because I do not believe zope will
> natively deal with file extensions that way. Finally, if you add a dtml doc
> to the LocalFS it also renders it as text/plain, leading me to believe that
> this is simply the behavior that was intended.
>
> So, short of modifying the LocalFS code, I think you've reached an impasse.
>
> The first question I asked myself when reading the problem description was
> "why do you need to add and render ZPT from the local filesystem?" I came
> up with:
>
> 1) You want to use ZPT stand alone. Which can be done but it requires
> changes to ZPT if I am not mistaken.
>
> or
>
> 2) You want to share files between 2 Zope instances.
>
> If you can maybe explain the *why* we can help find a more suitable
> solution.
>
> I could be wrong about this, I wont claim to know it all about LocalFS or
> ZPT but based on what I know and what I have observed with some cursory
> examination, this is what I think.
>
> Hope to have helped at least some.
>
> --
> Jeffrey D. Peterson
> Webmaster & Resident Standards Warrior
> "The Trouble with doing anything right the first time is that nobody
> appreciates how difficult it was."
>