Skip to content

Commit e17fdcd

Browse files
committed
Some grammar and wrapping changes to scenarios/web.
Also fixed a small typo.
1 parent 9079873 commit e17fdcd

1 file changed

Lines changed: 16 additions & 11 deletions

File tree

docs/scenarios/web.rst

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ WSGI is documented in :pep:`3333`.
2424
Frameworks
2525
::::::::::
2626

27-
Broadly speaking, a web framework consist of a set of libraries and a main
27+
Broadly speaking, a web framework consists of a set of libraries and a main
2828
handler within which you can build custom code to implement a web application
2929
(i.e. an interactive web site). Most web frameworks include patterns and
3030
utilities to accomplish at least the following:
@@ -280,15 +280,15 @@ and to the templates themselves.
280280

281281
- Template files should be passed only the dynamic
282282
content that is needed for rendering the template. Avoid
283-
to be tempted to pass additional content "just in case":
283+
the temptation to pass additional content "just in case":
284284
it is easier to add some missing variable when needed than to remove
285285
a likely unused variable later.
286286

287287
- Many template engines allow for complex statements
288288
or assignments in the template itself, and many
289289
allow some Python code to be evaluated in the
290290
templates. This convenience can lead to uncontrolled
291-
increase in complexity, and often harder to find bugs.
291+
increase in complexity, and often make it harder to find bugs.
292292

293293
- It is often necessary to mix JavaScript templates with
294294
HTML templates. A sane approach to this design is to isolate
@@ -299,9 +299,12 @@ and to the templates themselves.
299299

300300
Jinja2
301301
------
302-
`Jinja2 <http://jinja.pocoo.org/>`_ is a template engine which is similar to the Django template system with some extra features. It is a text-based template
303-
language and thus can be used to generate any markup. It allows customization of filters, tags, tests and globals.
304-
Unlike the template system implemented in the Django Framework it allows to call functions. The Code is staying under the BSD license.
302+
`Jinja2 <http://jinja.pocoo.org/>`_ is a template engine which is similar to
303+
the Django template system with some extra features. It is a text-based
304+
template language and thus can be used to generate any markup. It allows
305+
customization of filters, tags, tests and globals, and unlike the template
306+
system implemented in the Django Framework, also allows calling functions.
307+
Jinja2 is released under the BSD license.
305308

306309
Here some important html tags in Jinja2:
307310

@@ -324,8 +327,8 @@ Here some important html tags in Jinja2:
324327

325328

326329

327-
The next listings is an example of a web site in combination with the tornado web server. Tornado is not very complicate
328-
to use.
330+
The next listings is an example of a web site in combination with the tornado
331+
web server. Tornado is not very complicate to use.
329332

330333
.. code-block:: python
331334
@@ -365,7 +368,8 @@ to use.
365368
application.listen(PORT)
366369
tornado.ioloop.IOLoop.instance().start()
367370
368-
The :file:`base.html` file can be used as base for all site pages which are for example implemented in the content block.
371+
The :file:`base.html` file can be used as base for all site pages which are
372+
for example implemented in the content block.
369373

370374
.. code-block:: html
371375

@@ -389,8 +393,9 @@ The :file:`base.html` file can be used as base for all site pages which are for
389393
</body>
390394

391395

392-
The next listing is our site page (:file:`site.html`) loaded in the Python app which extends :file:`base.html`. The content block is
393-
automatically set into the corresponding block in the :file:`base.html` page.
396+
The next listing is our site page (:file:`site.html`) loaded in the Python
397+
app which extends :file:`base.html`. The content block is automatically set
398+
into the corresponding block in the :file:`base.html` page.
394399

395400
.. code-block:: html
396401

0 commit comments

Comments
 (0)