@@ -4,7 +4,7 @@ Step 3: Database Connections
4
4
----------------------------
5
5
6
6
We have created a function for establishing a database connection with
7
- `create_db ` but by itself that's not particularly useful. Creating and
7
+ `connect_db ` but by itself that's not particularly useful. Creating and
8
8
closing database connections all the time is very inefficient, so we want
9
9
to keep it around for longer. Because database connections encapsulate a
10
10
transaction we also need to make sure that only one request at the time
@@ -22,7 +22,7 @@ variable associated with the current application context. We will go into
22
22
the details of this a bit later.
23
23
24
24
For the time being all you have to know is that you can store information
25
- savely on the :data: `~flask.g ` object.
25
+ safely on the :data: `~flask.g ` object.
26
26
27
27
So when do you put it on there? To do that you can make a helper
28
28
function. The first time the function is called it will create a database
@@ -67,7 +67,7 @@ Continue to :ref:`tutorial-dbinit`.
67
67
where to put the code from this step and the next. A logical place is to
68
68
group these module-level functions together, and put your new
69
69
``get_db `` and ``close_db `` functions below your existing
70
- ``init_db `` function (following the tutorial line-by-line).
70
+ ``connect_db `` function (following the tutorial line-by-line).
71
71
72
72
If you need a moment to find your bearings, take a look at how the `example
73
73
source `_ is organized. In Flask, you can put all of your application code
0 commit comments