Update docs
This commit is contained in:
committed by
David Jennes
parent
8c379296ca
commit
67f94aa9f0
@@ -141,7 +141,7 @@ Let's take a look at an example. Here is our base template (``base.html``):
|
|||||||
</html>
|
</html>
|
||||||
|
|
||||||
This example declares three blocks, ``title``, ``sidebar`` and ``content``. We
|
This example declares three blocks, ``title``, ``sidebar`` and ``content``. We
|
||||||
can use the ``{% extends %}`` template tag to inherit from out base template
|
can use the ``{% extends %}`` template tag to inherit from our base template
|
||||||
and then use ``{% block %}`` to override any blocks from our base template.
|
and then use ``{% block %}`` to override any blocks from our base template.
|
||||||
|
|
||||||
A child template might look like the following:
|
A child template might look like the following:
|
||||||
@@ -195,3 +195,5 @@ inheritance is the following three-level approach:
|
|||||||
extend ``base.html`` and include section-specific styles/design.
|
extend ``base.html`` and include section-specific styles/design.
|
||||||
* Create individual templates for each type of page, such as a news article or
|
* Create individual templates for each type of page, such as a news article or
|
||||||
blog entry. These templates extend the appropriate section template.
|
blog entry. These templates extend the appropriate section template.
|
||||||
|
|
||||||
|
You can render block's content more than once by using ``{{ block.name }}`` **after** a block is defined.
|
||||||
|
|||||||
Reference in New Issue
Block a user