[Zope] Serving file from the local file system
Terry Hancock
hancock at anansispaceworks.com
Wed Dec 3 20:32:23 EST 2003
On Tuesday 02 December 2003 02:06 pm, Matthew Thorley wrote:
> I am interested in serving files (such as index_dtml) from the local
> filesystem so that I can export that file system with nfs and allow multiple
> people to work with the file ect.
If by this, you mean that you want Zope to treat the file as DTML code
and process it in context (not merely punching a hole through Zope
to a static file on the filesystem as LocalFS does), then you might be
interested to know that this is essentially the behavior of DTMLFile().
If you define a DTMLFile object from protected Python code (product
or external method):
from globals import DTMLFile
my_dtmlfile_method = DTMLFile('dtml/my_dtmlfile_method', globals())
The content will be retrieved from the original file on every request, so
updates to the source will apply immediately.
> I have tried two products LocalFS-0.10.1,
> and FSFolder-0-1-2. Neither product seems to do exactly what I want. One of
> my concerns is that I don't want to have to restart the server for the
> changes to take effect,the other is that I would rather not have to 'import'
> the files either after they have been changed. I was wondering if anybody had
> some suggestions in regard to this.
DTMLFile() object should fit the bill on that. The only downside is the need
to define them from product or external method code (but once defined,
they can be edited as you want).
Cheers,
Terry
--
Terry Hancock ( hancock at anansispaceworks.com )
Anansi Spaceworks http://www.anansispaceworks.com
More information about the Zope
mailing list