Skip to content

Commit a25ee7e

Browse files
committed
Merge pull request pallets#1186 from llimllib/master
some grammar fixes in docs/appcontext
2 parents 11fa387 + 3b3c5b8 commit a25ee7e

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

docs/appcontext.rst

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ Purpose of the Application Context
3838
----------------------------------
3939

4040
The main reason for the application's context existence is that in the
41-
past a bunch of functionality was attached to the request context in lack
42-
of a better solution. Since one of the pillar's of Flask's design is that
41+
past a bunch of functionality was attached to the request context for lack
42+
of a better solution. Since one of the pillars of Flask's design is that
4343
you can have more than one application in the same Python process.
4444

4545
So how does the code find the “right” application? In the past we
@@ -48,17 +48,17 @@ with libraries that were not designed with that in mind.
4848

4949
A common workaround for that problem was to use the
5050
:data:`~flask.current_app` proxy later on, which was bound to the current
51-
request's application reference. Since however creating such a request
52-
context is an unnecessarily expensive operation in case there is no
53-
request around, the application context was introduced.
51+
request's application reference. Since creating such a request context is
52+
an unnecessarily expensive operation in case there is no request around,
53+
the application context was introduced.
5454

5555
Creating an Application Context
5656
-------------------------------
5757

58-
To make an application context there are two ways. The first one is the
59-
implicit one: whenever a request context is pushed, an application context
60-
will be created alongside if this is necessary. As a result of that, you
61-
can ignore the existence of the application context unless you need it.
58+
There are two ways to make an application context. The first one is
59+
implicit: whenever a request context is pushed, an application context
60+
will be created alongside if this is necessary. As a result, you can
61+
ignore the existence of the application context unless you need it.
6262

6363
The second way is the explicit way using the
6464
:meth:`~flask.Flask.app_context` method::
@@ -91,9 +91,9 @@ For more information about that, see :ref:`extension-dev`.
9191
Context Usage
9292
-------------
9393

94-
The context is typically used to cache resources on there that need to be
95-
created on a per-request or usage case. For instance database connects
96-
are destined to go there. When storing things on the application context
94+
The context is typically used to cache resources that need to be created
95+
on a per-request or usage case. For instance, database connections are
96+
destined to go there. When storing things on the application context
9797
unique names should be chosen as this is a place that is shared between
9898
Flask applications and extensions.
9999

0 commit comments

Comments
 (0)