OpenGridMap / pgis

Power grid information system built on flask framework
Apache License 2.0
8 stars 2 forks source link

Refactor: Get all configuration variables from just one place. #70

Open tsrivishnu opened 8 years ago

tsrivishnu commented 8 years ago

Right now, app/__init.py__ reads from config.py which defines few constant variables and also loads few from database.yml and application.yml. Would be nice to just have one place (or at least one file for all variables that are secret or not constant) to look at for all the application variables.

After some reading, I suggest, we use an approach similar to the one discussed in the Flask guides: http://exploreflask.com/en/latest/configuration.html#configuring-based-on-environment-variables

Reference: