def configure_extensions(app): """ Attaches and configures any needed flask extensions to our app. :param app: """ db.init_app(app) migrate.init_app(app, db) principal.init_app(app) smtp_mail.init_app(app) metrics.init_app(app) sentry.init_app(app)
def configure_extensions(app): """ Attaches and configures any needed flask extensions to our app. :param app: """ db.init_app(app) migrate.init_app(app, db) principal.init_app(app) smtp_mail.init_app(app) metrics.init_app(app) sentry.init_app(app) if app.config['CORS']: app.config['CORS_HEADERS'] = 'Content-Type' cors.init_app(app, resources=r'/api/*', headers='Content-Type', origin='*', supports_credentials=True)
def configure_extensions(app): """ Attaches and configures any needed flask extensions to our app. :param app: """ db.init_app(app) migrate.init_app(app, db) principal.init_app(app) smtp_mail.init_app(app) metrics.init_app(app) sentry.init_app(app) if app.config["CORS"]: app.config["CORS_HEADERS"] = "Content-Type" cors.init_app( app, resources=r"/api/*", headers="Content-Type", origin="*", supports_credentials=True, )