Skip to content

Commit ff2786d

Browse files
jgraememitsuhiko
authored andcommitted
Fix some typos in the docs
1 parent d09aa37 commit ff2786d

File tree

8 files changed

+16
-16
lines changed

8 files changed

+16
-16
lines changed

docs/extensiondev.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ First we create the following folder structure::
6767
setup.py
6868
LICENSE
6969

70-
Here the contents of the most important files:
70+
Here's the contents of the most important files:
7171

7272
flaskext/__init__.py
7373
````````````````````
@@ -171,7 +171,7 @@ controller object that can be used to connect to the database.
171171
The Extension Code
172172
------------------
173173

174-
Here the contents of the `flaskext/sqlite3.py` for copy/paste::
174+
Here's the contents of the `flaskext/sqlite3.py` for copy/paste::
175175

176176
from __future__ import absolute_import
177177
import sqlite3
@@ -196,7 +196,7 @@ Here the contents of the `flaskext/sqlite3.py` for copy/paste::
196196
g.sqlite3_db.close()
197197
return response
198198

199-
So here what the lines of code do:
199+
So here's what the lines of code do:
200200

201201
1. the ``__future__`` import is necessary to activate absolute imports.
202202
This is needed because otherwise we could not call our module
@@ -237,7 +237,7 @@ If you don't need that, you can go with initialization functions.
237237
Initialization Functions
238238
------------------------
239239

240-
Here how the module would look like with initialization functions::
240+
Here's what the module would look like with initialization functions::
241241

242242
from __future__ import absolute_import
243243
import sqlite3

docs/patterns/errorpages.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Flask comes with a handy :func:`~flask.abort` function that aborts a
55
request with an HTTP error code early. It will also provide a plain black
66
and white error page for you with a basic description, but nothing fancy.
77

8-
Depening on the error code it is less or more likely for the user to
8+
Depending on the error code it is less or more likely for the user to
99
actually see such an error.
1010

1111
Common Error Codes

docs/patterns/jquery.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ is quite simple: it's on localhost port something and directly on the root
5353
of that server. But what if you later decide to move your application to
5454
a different location? For example to ``http://example.com/myapp``? On
5555
the server side this never was a problem because we were using the handy
56-
:func:`~flask.url_for` function that did could answer that question for
57-
us, but if we are using jQuery we should better not hardcode the path to
56+
:func:`~flask.url_for` function that could answer that question for
57+
us, but if we are using jQuery we should not hardcode the path to
5858
the application but make that dynamic, so how can we do that?
5959

6060
A simple method would be to add a script tag to our page that sets a
@@ -118,9 +118,9 @@ special error reporting in that case.
118118
The HTML
119119
--------
120120

121-
You index.html template either has to extend a `layout.html` template with
121+
Your index.html template either has to extend a `layout.html` template with
122122
jQuery loaded and the `$SCRIPT_ROOT` variable set, or do that on the top.
123-
Here the HTML code needed for our little application (`index.html`).
123+
Here's the HTML code needed for our little application (`index.html`).
124124
Notice that we also drop the script directly into the HTML here. It is
125125
usually a better idea to have that in a separate script file:
126126

docs/patterns/lazyloading.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ function but internally imports the real function on first use::
7474
return self.view(*args, **kwargs)
7575

7676
What's important here is is that `__module__` and `__name__` are properly
77-
set. This is used by Flask internally to figure out how to do name the
77+
set. This is used by Flask internally to figure out how to name the
7878
URL rules in case you don't provide a name for the rule yourself.
7979

8080
Then you can define your central place to combine the views like this::

docs/patterns/wtforms.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ how easy this is. WTForms does half the form generation for us already.
7777
To make it even nicer, we can write a macro that renders a field with
7878
label and a list of errors if there are any.
7979

80-
Here an example `_formhelpers.html` template with such a macro:
80+
Here's an example `_formhelpers.html` template with such a macro:
8181

8282
.. sourcecode:: html+jinja
8383

@@ -93,7 +93,7 @@ Here an example `_formhelpers.html` template with such a macro:
9393
{% endmacro %}
9494
9595
This macro accepts a couple of keyword arguments that are forwarded to
96-
WTForm's field function that renders the field for us. They keyword
96+
WTForm's field function that renders the field for us. The keyword
9797
arguments will be inserted as HTML attributes. So for example you can
9898
call ``render_field(form.username, class='username')`` to add a class to
9999
the input element. Note that WTForms returns standard Python unicode

docs/quickstart.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ parameter. Here are some examples:
231231
/user/John%20Doe
232232

233233
(This also uses the :meth:`~flask.Flask.test_request_context` method
234-
explained below. It basically tells flask to think we are handling a
234+
explained below. It basically tells Flask to think we are handling a
235235
request even though we are not, we are in an interactive Python shell.
236236
Have a look at the explanation below. :ref:`context-locals`).
237237

docs/security.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ do stupid things without them knowing.
7272

7373
Say you have a specific URL that, when you sent `POST` requests to will
7474
delete a user's profile (say `http://example.com/user/delete`). If an
75-
attacker now creates a page that sents a post request to that page with
75+
attacker now creates a page that sends a post request to that page with
7676
some JavaScript he just has to trick some users to that page and their
7777
profiles will end up being deleted.
7878

@@ -163,6 +163,6 @@ page loaded the data from the JSON response is in the `captured` array.
163163
Because it is a syntax error in JavaScript to have an object literal
164164
(``{...}``) toplevel an attacker could not just do a request to an
165165
external URL with the script tag to load up the data. So what Flask does
166-
is only allowing objects as toplevel elements when using
166+
is to only allow objects as toplevel elements when using
167167
:func:`~flask.jsonify`. Make sure to do the same when using an ordinary
168168
JSON generate function.

docs/upgrading.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Upgrading to Newer Releases
22
===========================
33

44
Flask itself is changing like any software is changing over time. Most of
5-
the changes are the nice kind, the kind where you don't have th change
5+
the changes are the nice kind, the kind where you don't have to change
66
anything in your code to profit from a new release.
77

88
However every once in a while there are changes that do require some

0 commit comments

Comments
 (0)