Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for config file variables in get_appsettings and initializedb #911

Merged
merged 2 commits into from Mar 21, 2013

Conversation

Projects
None yet
2 participants
@madjar
Copy link
Contributor

commented Mar 14, 2013

Being able to put variables in config files is neat, but the lack of support for this in the initializedb scaffold script make it a little difficult to use.

This pull requests solve the problem by changing the usage of the script to usage: %s <config_uri> [var=value] and making the modifications needed to make it work.

madjar added some commits Mar 14, 2013

Added an options argument to pyramid.paste.get_appsettings, just like…
… get_app, that can be used to get the settings when interpolation is used in the config file.
@mmerickel

This comment has been minimized.

Copy link
Member

commented Mar 21, 2013

I think it's really weird that the options are set in global_conf, but afaict that's the only way to do it via PasteDeploy. What I mean by this is that if you set options={'foo': 'bar'}, in order to populate

[app:myapp]
key = %(foo)s

Then the resulting settings will contain {'key': 'bar', 'foo': 'bar'}. Anyway, just documenting this somewhere.

@mmerickel mmerickel merged commit 9695701 into Pylons:master Mar 21, 2013

@mmerickel

This comment has been minimized.

Copy link
Member

commented Mar 21, 2013

Oops, I merged this but I need you to sign the CONTRIBUTORS.txt. I'll revert this in a couple days without a signature.

@madjar

This comment has been minimized.

Copy link
Contributor Author

commented Mar 21, 2013

Sorry about that. Here it is : #930

@mmerickel

This comment has been minimized.

Copy link
Member

commented Mar 21, 2013

Awesome, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.