[Grok-dev] Importing settings from buildout.cfg

Sebastian Ware sebastian at urbantalk.se
Fri Jul 31 09:09:08 EDT 2009


Many thanks! This was just what I was looking for!

Mvh Sebastian

31 jul 2009 kl. 15.02 skrev Christian Klinger:

> Hi again,
>
> maybe this is the howto you searched for:
>
> http://grok.zope.org/documentation/how-to/Set-custom-configurations-system-level
>
> Christian
>
>
>> Thanks, but I can't get this working as is. I am sure I saw a  
>> solution
>> to this problem in a thread on <grok-dev> but I just can't find it.
>> Email overload...
>>
>> Mvh Sebastian
>>
>> 31 jul 2009 kl. 13.32 skrev Christian Klinger:
>>
>>> Hi Sebastian,
>>>
>>> i can provide you an little (Zope2) example which works for me.
>>>
>>>
>>> ### buildout.cfg
>>> [instance]
>>> recipe = plone.recipe.zope2instance
>>> effective-user = reff
>>> extranet-product = <product-config extranet>
>>>            server http://10.30.0.86/
>>>           </product-config>
>>> zope-conf-additional = ${instance:extranet-product}
>>>
>>>
>>> ## your script
>>> from App.config import getConfiguration
>>>
>>> config = getConfiguration()
>>> extranet = config.product_config.get('extranet')
>>> server = extranet.get('server')
>>>
>>>
>>> HTH Christian
>>>
>>>
>>>
>>>> I know someone wrote how to import settings from buildout.cfg (or
>>>> maybe a zcml-file) but I can't find the instructions. Could someone
>>>> point me in the right direction?
>>>>
>>>> Mvh Sebastian
>>> _______________________________________________
>>> Grok-dev mailing list
>>> Grok-dev at zope.org
>>> http://mail.zope.org/mailman/listinfo/grok-dev
>
> _______________________________________________
> Grok-dev mailing list
> Grok-dev at zope.org
> http://mail.zope.org/mailman/listinfo/grok-dev



More information about the Grok-dev mailing list