Merge pull request #3 from ymek/master

Use expected config object when creating app instance
master
Steven Loria 11 years ago
commit 97e835461d
  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