From 12d6ec413083606761264753f6216111ca38db8c Mon Sep 17 00:00:00 2001 From: Sean Vieira Date: Tue, 3 Sep 2013 23:36:10 -0400 Subject: [PATCH] Fix with block --- docs/tutorial/dbinit.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorial/dbinit.rst b/docs/tutorial/dbinit.rst index cd128159..8f64c3b5 100644 --- a/docs/tutorial/dbinit.rst +++ b/docs/tutorial/dbinit.rst @@ -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())