Use expected config object when creating app

master
Myke Stubbs 11 years ago
parent 0380a342fa
commit e4662ec209
  1. 3
      {{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/app.py

@ -18,8 +18,7 @@ def create_app(config_object, env):
:param env: A string, the current environment. Either "dev" or "prod"
'''
app = Flask(__name__)
app.config.from_object('{{cookiecutter.repo_name}}.settings.{env}Config'
.format(env=env.capitalize()))
app.config.from_object(config_object)
app.config['ENV'] = env
# Initialize SQLAlchemy
db.init_app(app)

Loading…
Cancel
Save