There are several possible options without going beyond the PasteDeploy INI limits. However, first of all, realize the beauty of the INI file model - this is the basic ability to create several files with different settings / configurations. Yes, you should synchronize them, but these are just settings (without logic), so this should not be irresistible.
In any case, PasteDeploy supports the default partition , which is inherited by the [app:XXX] sections. Thus, you can post general settings there and have different sections [app:myapp-dev] and [app:myapp-prod] .
# settings.ini [DEFAULT] foo = bar [app:myapp-dev] use = egg:myapp [app:myapp-prod] use = egg:myapp set foo = baz
This can be started using
env/bin/pserve -n myapp-dev settings.ini
Another option is to use multiple configuration files.
# myapp.ini [app:myapp-section] use = egg:myapp foo = bar
This can be started using
env/bin/pserve myapp-prod.ini
If you do not want to use PasteDeploy (ini files), you can do something in Python, but there are real advantages to a simple configuration of this configuration.
Michael merickel
source share