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

Chris Withers chris at simplistix.co.uk
Sun Jul 4 04:19:23 EDT 2004


Hi all,

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?

cheers,

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk



More information about the Zope-Dev mailing list