miguelgrinberg/flasky — pull request #14 by steven-mercatante (2014-05-27 02:46:48+00:00)
Title: Update __init__.py

By moving `from config import config` to within `create_app()`, we ensure that all configuration is set *after* `manage.py` reads in the `.env` file.

I'm using the .env file to store my DB credentials. When I would run `manage.py db migrate` it would fail because at the time the Config class was imported and its properties were defined, `manage.py` had not yet read the .env file.