Deprecated TEMPLATE_DEBUG setting.

This commit is contained in:
Aymeric Augustin 2015-02-15 15:42:05 +01:00
parent 9fbd302f91
commit 15b711b5ee
20 changed files with 72 additions and 48 deletions

View file

@ -437,7 +437,7 @@ For example:
No wrapping of exceptions in ``TEMPLATE_DEBUG`` mode
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In previous versions of Django, whenever the :setting:`TEMPLATE_DEBUG` setting
In previous versions of Django, whenever the ``TEMPLATE_DEBUG`` setting
was ``True``, any exception raised during template rendering (even exceptions
unrelated to template syntax) were wrapped in ``TemplateSyntaxError`` and
re-raised. This was done in order to provide detailed template source location
@ -446,7 +446,7 @@ information in the debug 500 page.
In Django 1.4, exceptions are no longer wrapped. Instead, the original
exception is annotated with the source information. This means that catching
exceptions from template rendering is now consistent regardless of the value of
:setting:`TEMPLATE_DEBUG`, and there's no need to catch and unwrap
``TEMPLATE_DEBUG``, and there's no need to catch and unwrap
``TemplateSyntaxError`` in order to catch other errors.
``truncatechars`` template filter

View file

@ -845,7 +845,7 @@ Templates
* It is now possible to :ttag:`include` templates recursively.
* Template objects now have an origin attribute set when
:setting:`TEMPLATE_DEBUG` is ``True``. This allows template origins to be
``TEMPLATE_DEBUG`` is ``True``. This allows template origins to be
inspected and logged outside of the ``django.template`` infrastructure.
* ``TypeError`` exceptions are no longer silenced when raised during the

View file

@ -1263,6 +1263,7 @@ are deprecated in favor of :setting:`TEMPLATES`:
* ``ALLOWED_INCLUDE_ROOTS``
* ``TEMPLATE_CONTEXT_PROCESSORS``
* ``TEMPLATE_DEBUG``
* ``TEMPLATE_DIRS``
* ``TEMPLATE_LOADERS``
* ``TEMPLATE_STRING_IF_INVALID``