(config_object=FlaskAppConfig)
| 12 | |
| 13 | |
| 14 | def create_app(config_object=FlaskAppConfig): |
| 15 | app = Flask(__name__) |
| 16 | app.config.from_object(config_object) |
| 17 | CORS(app) |
| 18 | |
| 19 | # Initialize app with extensions |
| 20 | db.init_app(app) |
| 21 | # migrate = Migrate(app, db) |
| 22 | with app.app_context(): |
| 23 | db.create_all() |
| 24 | admin = Admin(None, name='admin', template_mode='bootstrap3') |
| 25 | admin.init_app(app) |
| 26 | |
| 27 | @app.route("/ping") |
| 28 | def ping(): |
| 29 | return 'pong' |
| 30 | |
| 31 | |
| 32 | app.register_blueprint(api_bp, url_prefix='/api') |
| 33 | app.register_blueprint(plugin, url_prefix='/plugin') |
| 34 | app.register_blueprint(discoverability, url_prefix='/examples') |
| 35 | app.register_blueprint(plugin_config) |
| 36 | |
| 37 | # from app.errors import bp as errors_bp |
| 38 | # app.register_blueprint(errors_bp) |
| 39 | |
| 40 | # from app.main import bp as main_bp |
| 41 | # app.register_blueprint(main_bp) |
| 42 | |
| 43 | return app |
nothing calls this directly
no outgoing calls
no test coverage detected