|
|
@ -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) |
|
|
|