[Zope] Re: CMF Filesystem Directory View

Casey Duncan casey at zope.com
Fri Feb 27 13:58:26 EST 2004

On Fri, 27 Feb 2004 11:42:45 -0700
"Poor Yorick" <zope.org at pooryorick.com> wrote:

> Hello, if the answer to my question is already available somewhere,
> please let me know... I looked around quite a bit.  I am trying to add
> a filesystem directory view (Zope 2.7, Plone 2.0), and can't figure
> out how to add new directories to the list of directories available to
> choose from.  Could anyone clue me in?

For security reasons you must "bless" directories as available for use
as FS directory views. To do this use this code in the initialization of
a product::

  from Products.CMFCore.DirectoryView import registerDirectory
  registerDirectory('dirname', globals())

This will register the directory relative to the package directory of
the product. AFAIK you can also specify absolute dir paths as well.

After you do this, that directory and all of its subdirectories will be
available when adding FS directory views.


More information about the Zope mailing list