mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Deprecated TEMPLATE_DEBUG setting.
This commit is contained in:
parent
9fbd302f91
commit
15b711b5ee
20 changed files with 72 additions and 48 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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``
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue