diff options
author | Arthur Koziel <arthur@arthurkoziel.com> | 2010-09-13 00:04:27 +0000 |
---|---|---|
committer | Arthur Koziel <arthur@arthurkoziel.com> | 2010-09-13 00:04:27 +0000 |
commit | dd49269c7db008b2567f50cb03c4d3d9b321daa1 (patch) | |
tree | 326dd25bb045ac016cda7966b43cbdfe1f67d699 /docs/ref/templates/builtins.txt | |
parent | c9b188c4ec939abbe48dae5a371276742e64b6b8 (diff) | |
download | django-soc2010/app-loading.tar.gz |
[soc2010/app-loading] merged trunkarchive/soc2010/app-loadingsoc2010/app-loading
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2010/app-loading@13818 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/ref/templates/builtins.txt')
-rw-r--r-- | docs/ref/templates/builtins.txt | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/docs/ref/templates/builtins.txt b/docs/ref/templates/builtins.txt index 002aa3f416..4f33bd212c 100644 --- a/docs/ref/templates/builtins.txt +++ b/docs/ref/templates/builtins.txt @@ -1,5 +1,3 @@ -.. _ref-templates-builtins: - ================================== Built-in template tags and filters ================================== @@ -25,7 +23,7 @@ autoescape Control the current auto-escaping behavior. This tag takes either ``on`` or ``off`` as an argument and that determines whether auto-escaping is in effect -inside the block. +inside the block. The block is closed with an ``endautoescape`` ending tag. When auto-escaping is in effect, all variable content has HTML escaping applied to it before placing the result into the output (but after any filters have @@ -36,6 +34,12 @@ The only exceptions are variables that are already marked as "safe" from escaping, either by the code that populated the variable, or because it has had the ``safe`` or ``escape`` filters applied. +Sample usage:: + + {% autoescape on %} + {{ body }} + {% endautoescape %} + .. templatetag:: block block @@ -60,8 +64,8 @@ csrf_token In the Django 1.1.X series, this is a no-op tag that returns an empty string for future compatibility purposes. In Django 1.2 and later, it is used for CSRF -protection, as described in the documentation for :ref:`Cross Site Request -Forgeries <ref-contrib-csrf>`. +protection, as described in the documentation for :doc:`Cross Site Request +Forgeries </ref/contrib/csrf>`. .. templatetag:: cycle @@ -633,7 +637,7 @@ load Load a custom template tag set. -See :ref:`Custom tag and filter libraries <howto-custom-template-tags>` for more information. +See :doc:`Custom tag and filter libraries </howto/custom-template-tags>` for more information. .. templatetag:: now @@ -1883,6 +1887,8 @@ For example:: If ``value`` is ``"Joel is a slug"``, the output will be ``"Joel is ..."``. +Newlines within the string will be removed. + .. templatefilter:: truncatewords_html truncatewords_html @@ -1902,6 +1908,8 @@ For example:: If ``value`` is ``"<p>Joel is a slug</p>"``, the output will be ``"<p>Joel is ...</p>"``. +Newlines in the HTML content will be preserved. + .. templatefilter:: unordered_list unordered_list @@ -2058,7 +2066,7 @@ django.contrib.humanize ~~~~~~~~~~~~~~~~~~~~~~~ A set of Django template filters useful for adding a "human touch" to data. See -:ref:`ref-contrib-humanize`. +:doc:`/ref/contrib/humanize`. django.contrib.markup ~~~~~~~~~~~~~~~~~~~~~ @@ -2069,13 +2077,13 @@ A collection of template filters that implement these common markup languages: * Markdown * ReST (ReStructured Text) -See :ref:`ref-contrib-markup`. +See the :doc:`markup documentation </ref/contrib/markup>`. django.contrib.webdesign ~~~~~~~~~~~~~~~~~~~~~~~~ A collection of template tags that can be useful while designing a website, -such as a generator of Lorem Ipsum text. See :ref:`ref-contrib-webdesign`. +such as a generator of Lorem Ipsum text. See :doc:`/ref/contrib/webdesign`. i18n ~~~~ |