summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorAndrei Kulakov <andrei.avk@gmail.com>2015-05-18 17:13:16 -0400
committerTim Graham <timograham@gmail.com>2015-05-21 19:51:41 -0400
commitfc3409b0932959f2aca42715e9147113d0e40f79 (patch)
tree8330e7ca5a9fca0b451006c183287997617ddc43 /docs
parent016d8cfbe21e0f1a5ea7172cfcc8b7b80920d817 (diff)
Fixed #24813 -- Documented {% include %} debug behavior variance
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/templates/builtins.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/ref/templates/builtins.txt b/docs/ref/templates/builtins.txt
index bfbc65b7cd..b7aef71e45 100644
--- a/docs/ref/templates/builtins.txt
+++ b/docs/ref/templates/builtins.txt
@@ -699,6 +699,15 @@ available to the included template::
{% include "name_snippet.html" with greeting="Hi" only %}
+If the included template causes an exception while it's rendered (including
+if it's missing or has syntax errors), the behavior varies depending on the
+:class:`template engine's <django.template.Engine>` ``debug`` option (if not
+set, this option defaults to the value of :setting:`DEBUG`). When debug mode is
+turned on, an exception like :exc:`~django.template.TemplateDoesNotExist` or
+:exc:`~django.template.TemplateSyntaxError` will be raised; otherwise
+``{% include %}`` silences any exception that happens while rendering the
+included template and returns an empty string.
+
.. note::
The :ttag:`include` tag should be considered as an implementation of
"render this subtemplate and include the HTML", not as "parse this