The Python Oracle

Can I have multiple ini config files in Pyramid?

Become part of the top 3% of the developers by applying to Toptal https://topt.al/25cXVn

--

Music by Eric Matyas
https://www.soundimage.org
Track title: Puzzle Game 5

--

Chapters
00:00 Question
00:28 Accepted answer (Score 8)
01:07 Thank you

--

Full question
https://stackoverflow.com/questions/2925...

Question links:
[Django One True Way]: https://speakerdeck.com/jacobian/the-bes...

Accepted answer links:
[paste docs]: http://pastedeploy.readthedocs.io/en/lat...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#python #pyramid #ini #paster #pythonpaste

#avk47



ACCEPTED ANSWER

Score 9


Yes that's possible. In one of my projects I have a production_base.ini file and all other production inis inherit from it:

production_base.ini

[app:main]
use = egg:xxx
maintenance_mode = False

production_www.ini

[app:main]
use = config:production_base.ini
maintenance_mode = True  # overwrites the value in the base ini

You can also check paste docs for more examples.

Side note - you can't inherit logging section though.