Is a setup like this not possible?
production.ini file:
[app:main]
use = egg:my_project
... various settings ...
[server:main]
...
development.ini file:
[app:main]
use = config:production.ini#main
... override some production settings ...
Then I try starting my development server and get:
No section 'main' (prefixed by 'server') found in config development.ini
I'd like to chain my config files together like so:
production.ini -> development.ini -> local.ini -> test.ini
It seems like this should be possible, but I haven't gotten the magic right yet.
It is possible to inherit INI files, but the inheritance only works on a section-by-section basis. So if you don't explicitly tell "test.ini" to inherit the [server:main] section, then it won't. The docs on all of this are via the PasteDeploy package although it's not entirely obvious.
I've never actually seen an inheritance chain for the [server] section, but it may be possible... usually you just see that done with [app] sections. I wouldn't be surprised if you had to duplicate that section between files.
As a side note, the logging configuration in an INI file is not inheritable... that's not actually controlled by PasteDeploy at all so you'd have to duplicate it in each file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With