[Zope-dev] How to add sections to zope.conf?

Dieter Maurer dieter at handshake.de
Fri Jul 9 14:18:04 EDT 2004


Chris Withers wrote at 2004-7-4 09:19 +0100:
>Say I have a process which needs some configuration but which is based on zope.
>How do I add arbitary sections into zope.conf at the top level and then how do I 
>get hold of the configuration?
>
>What I'd like to do (and tried!) is to write a component.xml, put it in my 
>package and then add a section to the top-level of my zope.conf something like:
>
>%import mypackage
><mypackage_config>
>somekey somevalue
></mypackage_config>
>
>...and then get hold of it with:
>
>from App.config import getConfiguration
>config = getConfiguration().mypackage_config
>
>...but this doesn't seem to work. Am I doing something wrong or do their need to 
>be changes to zopeschema.xml to allow this?

You must extend the "zopeschema.xml" or let your process use
a schema derived from "zopeschema.xml" (schema support some form
of inheritance).

-- 
Dieter


More information about the Zope-Dev mailing list