diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2015-02-15 15:42:05 +0100 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2015-02-15 20:48:48 +0100 |
| commit | e8950668ca4c3160cef3e1191a02ba1388a98cac (patch) | |
| tree | e081bce567a40c9bfe5d2c53ca08a4400b801dc7 /docs/ref | |
| parent | 69c662c9817f8c558d5e7a357221fdedb3bb7f59 (diff) | |
[1.8.x] Deprecated TEMPLATE_DEBUG setting.
Backport of 15b711b from master.
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/settings.txt | 5 | ||||
| -rw-r--r-- | docs/ref/templates/api.txt | 2 | ||||
| -rw-r--r-- | docs/ref/templates/upgrading.txt | 10 |
3 files changed, 13 insertions, 4 deletions
diff --git a/docs/ref/settings.txt b/docs/ref/settings.txt index db2850da6d..4744098754 100644 --- a/docs/ref/settings.txt +++ b/docs/ref/settings.txt @@ -2421,6 +2421,11 @@ TEMPLATE_DEBUG Default: ``False`` +.. deprecated:: 1.8 + + Set the ``'debug'`` option in the :setting:`OPTIONS <TEMPLATES-OPTIONS>` + of a ``DjangoTemplates`` backend instead. + A boolean that turns on/off template debug mode. If this is ``True``, the fancy error page will display a detailed report for any exception raised during template rendering. This report contains the relevant snippet of the template, diff --git a/docs/ref/templates/api.txt b/docs/ref/templates/api.txt index 9faca5b9e1..b6d5c9e9c1 100644 --- a/docs/ref/templates/api.txt +++ b/docs/ref/templates/api.txt @@ -946,7 +946,7 @@ Template origin When an :class:`~django.template.Engine` is initialized with ``debug=True``, its templates have an ``origin`` attribute depending on the source they are loaded from. For engines initialized by Django, ``debug`` defaults to the -value of :setting:`TEMPLATE_DEBUG`. +value of :setting:`DEBUG`. .. class:: loader.LoaderOrigin diff --git a/docs/ref/templates/upgrading.txt b/docs/ref/templates/upgrading.txt index c7b07464b0..98778c36ba 100644 --- a/docs/ref/templates/upgrading.txt +++ b/docs/ref/templates/upgrading.txt @@ -10,7 +10,7 @@ The :setting:`TEMPLATES` settings ================================= A new setting was introduced in Django 1.8: :setting:`TEMPLATES`. All existing -template-related settings except :setting:`TEMPLATE_DEBUG` were deprecated. +template-related settings were deprecated. During the deprecation period, Django will create a backwards-compatible :setting:`TEMPLATES` based on the ``TEMPLATE_*`` settings if you don't define @@ -85,9 +85,13 @@ If your settings module defines ``ALLOWED_INCLUDE_ROOTS`` or ``'allowed_include_roots'`` and ``'string_if_invalid'`` keys in the ``'OPTIONS'`` dictionary. +If it sets ``TEMPLATE_DEBUG`` to a value that differs from :setting:`DEBUG`, +include that value under the ``'debug'`` key in ``'OPTIONS'``. + Once you have defined :setting:`TEMPLATES`, you can safely remove -``ALLOWED_INCLUDE_ROOTS``, ``TEMPLATE_CONTEXT_PROCESSORS``, ``TEMPLATE_DIRS``, -``TEMPLATE_LOADERS``, and ``TEMPLATE_STRING_IF_INVALID``. +``ALLOWED_INCLUDE_ROOTS``, ``TEMPLATE_CONTEXT_PROCESSORS``, +``TEMPLATE_DEBUG``, ``TEMPLATE_DIRS``, ``TEMPLATE_LOADERS``, and +``TEMPLATE_STRING_IF_INVALID``. If you are overriding some of these settings in tests, you should override the entire :setting:`TEMPLATES` setting instead. |
