mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Fixed #14502 -- Added a verbatim template tag.
Thanks SmileyChris for the patch.
This commit is contained in:
parent
2c57809a56
commit
4464bbba15
5 changed files with 86 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue