Commit e371b795 authored by Fred Drake's avatar Fred Drake

Allow a site admin to specify additional directories for products as part of

the Zope configuration file.  There is no magical search for
INSTANCE_HOME/Products; it is included as part of the instance skeleton,
but can be controlled simply changing the configuration.
parent 53bf56f8
......@@ -101,6 +101,16 @@ def root_handler(config):
fixups of values that require knowledge about configuration
values outside of their context. """
# Add any product directories not already in Products.__path__.
# Directories are added in the order
if config.products:
import Products
L = []
for d in config.products + Products.__path__:
if d not in L:
L.append(d)
Products.__path__[:] = L
# if no servers are defined, create default http server and ftp server
if not config.servers:
import ZServer.datatypes
......
......@@ -179,6 +179,14 @@
</description>
</key>
<multikey name="products" datatype="existing-directory">
<description>
This specifies additional product directories which are added to
Products.__path__. Directories are added in the order in which
they are specified.
</description>
</multikey>
<key name="structured-text-header-level" datatype="integer" default="3"
handler="structured_text_header_level"/>
......
......@@ -43,6 +43,23 @@ instancehome $INSTANCE
# clienthome /home/chrism/projects/sessions/var
# Directive: products
#
# Description:
# Name of a directory that contains product packages. This
# directive may be used as many times as needed to add additional
# collections of products. Each directory identified will be
# added to the __path__ of the Products package.
#
# Default: (none)
#
# Example:
#
# products /home/chrism/projects/myproducts
products $INSTANCE/Products
# Directive: debug-mode
#
# Description:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment