Пример #1
0
 def __call__(self, *args, **kwargs):
     from enferno.app import create_app
     with create_app(cfg).app_context():
         return super(ContextTask, self).__call__(*args, **kwargs)
Пример #2
0
import os
import warnings
from flask.exthook import ExtDeprecationWarning
warnings.simplefilter('ignore', ExtDeprecationWarning)


from enferno.app import create_app
from enferno.settings import DevConfig, ProdConfig

CONFIG = ProdConfig if os.environ.get('FLASK_DEBUG') == '0' else DevConfig

app = create_app(CONFIG)
Пример #3
0
 def __call__(self, *args, **kwargs):
     from enferno.app import create_app
     with create_app(cfg).app_context():
         return super(ContextTask, self).__call__(*args, **kwargs)
Пример #4
0
import os
from enferno.app import create_app
from enferno.settings import DevConfig, ProdConfig

CONFIG = ProdConfig if os.environ.get('FLASK_DEBUG') == '0' else DevConfig

app = create_app(CONFIG)