diff options
| author | Curtis Maloney <curtis@tinbrain.net> | 2018-09-11 03:00:34 +1000 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2018-09-10 13:00:34 -0400 |
| commit | c49ea6f5911296dcb40190c905e38b43cdc7c7a3 (patch) | |
| tree | 56d6341ed09e5d77cd3361bcc5275eab5733db4a /docs/ref/templates | |
| parent | f8ff529ee32c79b270176f5e8d7a3f6ef048ac31 (diff) | |
Refs #20910 -- Replaced snippet directive with code-block.
Diffstat (limited to 'docs/ref/templates')
| -rw-r--r-- | docs/ref/templates/language.txt | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/docs/ref/templates/language.txt b/docs/ref/templates/language.txt index a10cfde03b..1287f012c2 100644 --- a/docs/ref/templates/language.txt +++ b/docs/ref/templates/language.txt @@ -559,8 +559,8 @@ The auto-escaping tag passes its effect onto templates that extend the current one as well as templates included via the :ttag:`include` tag, just like all block tags. For example: -.. snippet:: - :filename: base.html +.. code-block:: html+django + :caption: base.html {% autoescape off %} <h1>{% block title %}{% endblock %}</h1> @@ -568,8 +568,8 @@ just like all block tags. For example: {% endblock %} {% endautoescape %} -.. snippet:: - :filename: child.html +.. code-block:: html+django + :caption: child.html {% extends "base.html" %} {% block title %}This & that{% endblock %} @@ -649,15 +649,15 @@ of all comments related to the current task with:: And of course you can easily access methods you've explicitly defined on your own models: -.. snippet:: - :filename: models.py +.. code-block:: python + :caption: models.py class Task(models.Model): def foo(self): return "bar" -.. snippet:: - :filename: template.html +.. code-block:: html+django + :caption: template.html {{ task.foo }} |
