From 4464bbba15d50ed32beb5995c13d26791ca61fe4 Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Thu, 7 Jun 2012 09:59:14 +0200 Subject: Fixed #14502 -- Added a verbatim template tag. Thanks SmileyChris for the patch. --- docs/ref/templates/builtins.txt | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'docs/ref') 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 `, 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 -- cgit v1.3