[Zope-dev] zope.app.paste
Jim Fulton
jim at zope.com
Thu Dec 15 19:07:30 UTC 2011
On Thu, Dec 15, 2011 at 2:00 PM, Stephan Richter
<stephan.richter at gmail.com> wrote:
> On Thursday, December 15, 2011 01:54:01 PM Jim Fulton wrote:
>> How do values get from DEFAULT into the other sections?
>>
>> If this is a buildout behavior, it's unintentional and unlikely to
>> work in the future.
>
> This is a configparser feature. The [DEFAULT] section contains options that
> propagate to all other sections. Unless buildout is not using configparser in
> the future, then the feature is pretty stable. :-)
buildout 2 doesn't use config parser. IIRC, there was never an
intention to support DEFAULT (except perhaps beyond some initial
prototypes).
> Of course, it is no big
> deal to repeat the options in every section, but that's more verbose.
You could use macros,
http://pypi.python.org/pypi/zc.buildout/1.5.2#extending-sections-macros
[dev_ini]
recipe = collective.recipe.template
call-server = http://localhost:8000/calls/tropo
input = ${buildout:paster-directory}/dev.ini.in
output = ${buildout:paster-directory}/dev.ini
sites-config-directory = ${buildout:directory}/data/sites-config/dev
mail-directory = ${buildout:var-directory}/mail
zodb-config-path = ${buildout:paster-directory}/zodb.conf
database = db
database-host = localhost
logs-directory = ${buildout:directory}/logs
web-server-host = localhost
web-server-port = 8000
[staging_ini]
<= dev
input = ${buildout:paster-directory}/prod.ini.in
output = ${buildout:paster-directory}/staging.ini
web-server-host = staging
web-server-port = 8020
database = staging-db
Jim
--
Jim Fulton
http://www.linkedin.com/in/jimfulton
More information about the Zope-Dev
mailing list