From 331ca5391eb64cbac3a001209257beb93522d587 Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Thu, 8 Sep 2016 18:24:22 -0700 Subject: Fixed #27175 -- Deprecated silencing exceptions from the {% include %} template tag. Thanks Tim Graham for the review. --- docs/internals/deprecation.txt | 3 +++ docs/ref/templates/builtins.txt | 5 +++++ docs/releases/1.11.txt | 5 +++++ 3 files changed, 13 insertions(+) (limited to 'docs') diff --git a/docs/internals/deprecation.txt b/docs/internals/deprecation.txt index 5d93915dc6..151cdff68d 100644 --- a/docs/internals/deprecation.txt +++ b/docs/internals/deprecation.txt @@ -33,6 +33,9 @@ details on these changes. * The ``host`` parameter of ``django.utils.http.is_safe_url()`` will be removed. +* Silencing of exceptions raised while rendering the ``{% include %}`` template + tag will be removed. + .. _deprecation-removed-in-2.0: 2.0 diff --git a/docs/ref/templates/builtins.txt b/docs/ref/templates/builtins.txt index 61c36f47fb..6395f97607 100644 --- a/docs/ref/templates/builtins.txt +++ b/docs/ref/templates/builtins.txt @@ -731,6 +731,11 @@ is turned off, ``{% include %}`` logs a warning to the ``django.template`` logger with the exception that happens while rendering the included template and returns an empty string. +.. deprecated:: 1.11 + + Silencing exceptions raised while rendering the ``{% include %}`` template + tag is deprecated. In Django 2.1, the exception will be raised. + .. note:: The :ttag:`include` tag should be considered as an implementation of "render this subtemplate and include the HTML", not as "parse this diff --git a/docs/releases/1.11.txt b/docs/releases/1.11.txt index 0c1e387b66..221f58f291 100644 --- a/docs/releases/1.11.txt +++ b/docs/releases/1.11.txt @@ -528,3 +528,8 @@ Miscellaneous * The ``host`` parameter of ``django.utils.http.is_safe_url()`` is deprecated in favor of the new ``allowed_hosts`` parameter. + +* Silencing exceptions raised while rendering the + :ttag:`{% include %} ` template tag is deprecated as the behavior is + often more confusing than helpful. In Django 2.1, the exception will be + raised. -- cgit v1.3