def register_extensions(app): """ Import and register flask extensions and initialize with app object """ from app.assets import assets assets.init_app(app)
def register_extensions(app): db.init_app(app) lm.init_app(app) mail.init_app(app) bcrypt.init_app(app) celery.config_from_object(app.config) assets.init_app(app) babel.init_app(app)
def register_extensions(app): heroku.init_app(app) travis.init_app(app) db.init_app(app) api.init_app(app) lm.init_app(app) mail.init_app(app) bcrypt.init_app(app) celery.config_from_object(app.config) assets.init_app(app)
def register_extensions(app): """Register Flask extensions.""" assets.init_app(app) bcrypt.init_app(app) cache.init_app(app) db.init_app(app) csrf_protect.init_app(app) login_manager.init_app(app) debug_toolbar.init_app(app) migrate.init_app(app, db) return None
def register_extensions(app): """Register Flask extensions.""" assets.init_app(app) bcrypt.init_app(app) cache.init_app(app) db.init_app(app) csrf_protect.init_app(app) login_manager.init_app(app) debug_toolbar.init_app(app) migrate.init_app(app, db) return None
def register_extensions(app): """Register extensions with the Flask application.""" travis.init_app(app) db.init_app(app) lm.init_app(app) mail.init_app(app) bcrypt.init_app(app) assets.init_app(app) babel.init_app(app) rq.init_app(app) migrate.init_app(app, db)
def register_extensions(app): heroku.init_app(app) travis.init_app(app) db.init_app(app) api.init_app(app) lm.init_app(app) mail.init_app(app) bcrypt.init_app(app) celery.config_from_object(app.config) assets.init_app(app) babel.init_app(app) csrf.init_app(app)
def register_extensions(app: Flask): """Register Flask-Plugin modules""" assets.init_app(app) db.init_app(app) cache.init_app(app) mail.init_app(app) migrate.init_app(app, db) marshmallow.init_app(app) login.init_app(app) login.blueprint_login_views = {'auth': '/login'} from app.blueprints.term import events # necessary for socketio socketio.init_app(app, async_mode=None)
def register_extensions(app): """Register extensions with the Flask application.""" travis.init_app(app) db.init_app(app) lm.init_app(app) mail.init_app(app) bcrypt.init_app(app) assets.init_app(app) babel.init_app(app) rq.init_app(app) migrate.init_app(app, db) limiter.init_app(app)
# subclass SQLAlchemy to enable pool_pre_ping class SQLAlchemy(SA): def apply_pool_defaults(self, app, options): SA.apply_pool_defaults(self, app, options) options["pool_pre_ping"] = True from app.assets import assets app = Flask(__name__) app.config.from_object('config') app.wsgi_app = ProxyFix(app.wsgi_app) csrf = SeaSurf(app) assets.init_app(app) #### CONFIGURE LOGGER #### from app.lib.log import logger logging = logger('powerdns-admin', app.config['LOG_LEVEL'], app.config['LOG_FILE']).config() login_manager = LoginManager() login_manager.init_app(app) db = SQLAlchemy(app) # database migrate = Migrate(app, db) # flask-migrate authlib_oauth_client = AuthlibOAuth(app) # authlib oauth if app.config.get('SAML_ENABLED') and app.config.get('SAML_ENCRYPT'): from app.lib import certutil if not certutil.check_certificate():
def register_extensions(app): assets.init_app(app)