Skip to content

Commit aa83d91

Browse files
author
Kenneth Reitz
committed
Merge pull request pallets#683 from alexcouper/master
Tiny changes to docs
2 parents 8a968a9 + 1be1329 commit aa83d91

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

docs/patterns/templateinheritance.rst

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,15 @@ document that you might use for a simple two-column page. It's the job of
2828
<title>{% block title %}{% endblock %} - My Webpage</title>
2929
{% endblock %}
3030
</head>
31-
<body>
32-
<div id="content">{% block content %}{% endblock %}</div>
33-
<div id="footer">
34-
{% block footer %}
35-
&copy; Copyright 2010 by <a href="http://domain.invalid/">you</a>.
36-
{% endblock %}
37-
</div>
38-
</body>
31+
<body>
32+
<div id="content">{% block content %}{% endblock %}</div>
33+
<div id="footer">
34+
{% block footer %}
35+
&copy; Copyright 2010 by <a href="http://domain.invalid/">you</a>.
36+
{% endblock %}
37+
</div>
38+
</body>
39+
</html>
3940

4041
In this example, the ``{% block %}`` tags define four blocks that child templates
4142
can fill in. All the `block` tag does is tell the template engine that a

docs/quickstart.rst

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,14 @@ should see your hello world greeting.
3838
So what did that code do?
3939

4040
1. First we imported the :class:`~flask.Flask` class. An instance of this
41-
class will be our WSGI application. The first argument is the name of
42-
the application's module. If you are using a single module (as in this
43-
example), you should use `__name__` because depending on if it's started as
44-
application or imported as module the name will be different (``'__main__'``
45-
versus the actual import name). For more information, have a look at the
46-
:class:`~flask.Flask` documentation.
47-
2. Next we create an instance of this class. We pass it the name of the module
48-
or package. This is needed so that Flask knows where to look for templates,
49-
static files, and so on.
41+
class will be our WSGI application.
42+
2. Next we create an instance of this class. The first argument is the name of
43+
the application's module or package. If you are using a single module (as
44+
in this example), you should use `__name__` because depending on if it's
45+
started as application or imported as module the name will be different
46+
(``'__main__'`` versus the actual import name). This is needed so that
47+
Flask knows where to look for templates, static files, and so on. For more
48+
information have a look at the :class:`~flask.Flask` documentation.
5049
3. We then use the :meth:`~flask.Flask.route` decorator to tell Flask what URL
5150
should trigger our function.
5251
4. The function is given a name which is also used to generate URLs for that

0 commit comments

Comments
 (0)