MCPcopy Create free account
hub / github.com/pallets/flask / init_app

Function init_app

examples/tutorial/flaskr/db.py:51–56  ·  view source on GitHub ↗

Register database functions with the Flask app. This is called by the application factory.

(app)

Source from the content-addressed store, hash-verified

49
50
51def init_app(app):
52 """Register database functions with the Flask app. This is called by
53 the application factory.
54 """
55 app.teardown_appcontext(close_db)
56 app.cli.add_command(init_db_command)

Callers

nothing calls this directly

Calls 1

teardown_appcontextMethod · 0.80

Tested by

no test coverage detected