Skip to content

Commit 470112d

Browse files
authored
Merge pull request pallets#2500 from BogdanAlexandru/patch-1
Improvements in the final sections of appfactories.rst
2 parents a35fc3c + b89cf95 commit 470112d

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

docs/patterns/appfactories.rst

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,9 @@ For more information about the design of extensions refer to :doc:`/extensiondev
8989
Using Applications
9090
------------------
9191

92-
So to use such an application you then have to create the application
93-
first in a separate file otherwise the :command:`flask` command won't be able
94-
to find it. Here an example :file:`exampleapp.py` file that creates such
95-
an application::
92+
To use such an application you have to create it in a separate file first,
93+
otherwise the :command:`flask` command won't be able to find it. Here's an
94+
example :file:`exampleapp.py` file that creates such an application::
9695

9796
from yourapplication import create_app
9897
app = create_app('/path/to/config.cfg')
@@ -105,12 +104,12 @@ It can then be used with the :command:`flask` command::
105104
Factory Improvements
106105
--------------------
107106

108-
The factory function from above is not very clever so far, you can improve
109-
it. The following changes are straightforward and possible:
107+
The factory function above is not very clever, but you can improve it.
108+
The following changes are straightforward to implement:
110109

111-
1. make it possible to pass in configuration values for unittests so that
112-
you don't have to create config files on the filesystem
113-
2. call a function from a blueprint when the application is setting up so
110+
1. Make it possible to pass in configuration values for unit tests so that
111+
you don't have to create config files on the filesystem.
112+
2. Call a function from a blueprint when the application is setting up so
114113
that you have a place to modify attributes of the application (like
115-
hooking in before / after request handlers etc.)
116-
3. Add in WSGI middlewares when the application is creating if necessary.
114+
hooking in before/after request handlers etc.)
115+
3. Add in WSGI middlewares when the application is being created if necessary.

0 commit comments

Comments
 (0)