diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2012-06-07 09:59:14 +0200 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2012-06-07 09:59:14 +0200 |
| commit | 4464bbba15d50ed32beb5995c13d26791ca61fe4 (patch) | |
| tree | 6b5e2800c14b62db83ad3c1f723074b2153a1c14 /docs | |
| parent | 2c57809a560cb67c79b9e8a77cc713e8a2424c8e (diff) | |
Fixed #14502 -- Added a verbatim template tag.
Thanks SmileyChris for the patch.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/templates/builtins.txt | 23 | ||||
| -rw-r--r-- | docs/releases/1.5.txt | 7 |
2 files changed, 30 insertions, 0 deletions
diff --git a/docs/ref/templates/builtins.txt b/docs/ref/templates/builtins.txt index 805aaf7f6f..af9004bbf1 100644 --- a/docs/ref/templates/builtins.txt +++ b/docs/ref/templates/builtins.txt @@ -1040,6 +1040,29 @@ This will follow the normal :ref:`namespaced URL resolution strategy <topics-http-reversing-url-namespaces>`, including using any hints provided by the context as to the current application. +.. templatetag:: verbatim + +verbatim +^^^^^^^^ + +.. versionadded:: 1.5 + +Stops the template engine from rendering the contents of this block tag. + +A common use is to allow a Javascript template layer that collides with +Django's syntax. For example:: + + {% verbatim %} + {{if dying}}Still alive.{{/if}} + {% endverbatim %} + +You can also specify an alternate closing tag:: + + {% verbatim finished %} + The verbatim tag looks like this: + {% verbatim %}{% endverbatim %} + {% finished %} + .. templatetag:: widthratio widthratio diff --git a/docs/releases/1.5.txt b/docs/releases/1.5.txt index 696f332285..33f5003281 100644 --- a/docs/releases/1.5.txt +++ b/docs/releases/1.5.txt @@ -62,6 +62,13 @@ For one-to-one relationships, both sides can be cached. For many-to-one relationships, only the single side of the relationship can be cached. This is particularly helpful in combination with ``prefetch_related``. +``{% verbatim %}`` template tag +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +To make it easier to deal with javascript templates which collide with Django's +syntax, you can now use the :ttag:`verbatim` block tag to avoid parsing the +tag's content. + Minor features ~~~~~~~~~~~~~~ |
