commit
8c8c5c98b6
@ -1,10 +1,10 @@ |
|||||||
# -*- coding: utf-8 -*- |
# -*- coding: utf-8 -*- |
||||||
"""Create an application instance.""" |
"""Create an application instance.""" |
||||||
import os |
from flask.helpers import get_debug_flag |
||||||
|
|
||||||
from {{cookiecutter.app_name}}.app import create_app |
from {{cookiecutter.app_name}}.app import create_app |
||||||
from {{cookiecutter.app_name}}.settings import DevConfig, ProdConfig |
from {{cookiecutter.app_name}}.settings import DevConfig, ProdConfig |
||||||
|
|
||||||
CONFIG = ProdConfig if os.environ.get('{{cookiecutter.app_name | upper}}_ENV') == 'prod' else DevConfig |
CONFIG = DevConfig if get_debug_flag() else ProdConfig |
||||||
|
|
||||||
app = create_app(CONFIG) |
app = create_app(CONFIG) |
||||||
|
Loading…
Reference in new issue