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" :param env: A string, the current environment. Either "dev" or "prod"
''' '''
app = Flask(__name__) app = Flask(__name__)
app.config.from_object('{{cookiecutter.repo_name}}.settings.{env}Config' app.config.from_object(config_object)
.format(env=env.capitalize()))
app.config['ENV'] = env app.config['ENV'] = env
# Initialize SQLAlchemy # Initialize SQLAlchemy
db.init_app(app) db.init_app(app)

Loading…
Cancel
Save