Re: zope.app.paste

Jim Fulton <[email protected]>
Newsgroups gmane.comp.web.zope.devel
Message-ID <CAPDm-FjVHdg5HHwyiH=0xnWaFDfqvN6_03b0VgMSHrp=wzgE5Q@mail.gmail.com>
On Thu, Dec 15, 2011 at 2:00 PM, Stephan Richter
<[email protected]> 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
_______________________________________________
Zope-Dev maillist  -  [email protected]
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.