forked from orbit-oss/flask
Fix with block
This commit is contained in:
parent
36d70d8789
commit
12d6ec4130
1 changed files with 1 additions and 1 deletions
|
|
@ -25,7 +25,7 @@ database. Let me show you the code first. Just add that function below
|
|||
the `connect_db` function in `flaskr.py`::
|
||||
|
||||
def init_db():
|
||||
app app.app_context():
|
||||
with app.app_context():
|
||||
db = get_db()
|
||||
with app.open_resource('schema.sql', mode='r') as f:
|
||||
db.cursor().executescript(f.read())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue