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

Fix Configuration Handling #8

Open
DakotaNelson opened this issue May 2, 2017 · 0 comments
Open

Fix Configuration Handling #8

DakotaNelson opened this issue May 2, 2017 · 0 comments

Comments

@DakotaNelson
Copy link
Collaborator

Right now, configuration is handled in two places: a .env file, which is used by Heroku, and the Flask configuration handling system.

This means that some parts of the application use os.environ.get, while others use current_app.config. This is confusing and bad, and leaves configuration scattered across multiple sources.

Solution:

Set up a default_settings.py file (perhaps give it a better name) that resembles this example, then update the configuration import in Flask (again, following this example), and make sure that everywhere in the code that uses os.environ.get is changed to use current_app.config. Ensure that all settings and configuration are handled in one place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant