[Zope] LocalFS and ZPT

Jeff Peterson jpeterso@rangebroadband.com
Wed, 10 Apr 2002 10:54:09 -0500


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."

> -----Original Message-----
> From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of
> blossom merz
> Sent: Tuesday, April 09, 2002 5:25 PM
> To: jpeterso@rangebroadband.com
> Cc: zope@zope.org
> Subject: RE: [Zope] LocalFS and ZPT
>
>
> Hello, Jeff.
>
> I'm sorry for my lack of clarity; I'm a zope newbie.
>
> What I need to do is store ZPTs on the local filesystem, and have them
> treated as page templates when they are browsed. As it stands, they are
> served as the text of the source.
>
> If you have LocalFS installed, you can see what I mean by trying two
> things:
> 1) try to add a Page Template to a localFS directory:
>      Error Value: Cannot add objects of type 'Page Template' to local
>      directories.
> 2) copy the text of a ZPT into a file ending in .zpt in the directory on
> the filesystem, and try to 'view' it.
>
> I see that in the edit menu of the localFS instance (as well as in the
> source of the module), I have the ability to add new types to the type
> map. I have tried inserting an entry for .zpt, but nothing I've tried
> will get it to treat these files as page templates.
>
> Does this all make sense?
>
> Thanks for your help!
> blossom
>
>
> _______________________________________________
> 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 )