Skip to content
Myr

Fix with block

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Sean Vieira · committed by Sean Vieira · parent 36d70d8 · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:docs/tutorial/dbinit.rst+1 added-1 removed
23 unmodified lines
24database. Let me show you the code first. Just add that function below25the `connect_db` function in `flaskr.py`::2627 def init_db():28 app app.app_context():28 with app.app_context():29 db = get_db()30 with app.open_resource('schema.sql', mode='r') as f:31 db.cursor().executescript(f.read())32 db.commit()
37 unmodified lines