forked from orbit-oss/flask
parent
c2e5799879
commit
7ee40e9348
1 changed files with 1 additions and 1 deletions
|
|
@ -32,7 +32,7 @@ add the following lines to your existing imports in `flaskr.py`::
|
||||||
Next we can create a function called `init_db` that initializes the
|
Next we can create a function called `init_db` that initializes the
|
||||||
database. For this we can use the `connect_db` function we defined
|
database. For this we can use the `connect_db` function we defined
|
||||||
earlier. Just add that function below the `connect_db` function in
|
earlier. Just add that function below the `connect_db` function in
|
||||||
`flask.py`::
|
`flaskr.py`::
|
||||||
|
|
||||||
def init_db():
|
def init_db():
|
||||||
with closing(connect_db()) as db:
|
with closing(connect_db()) as db:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue