Fixed #29002 -- Corrected cached template loader docs about when it's automatically enabled.

Thanks oTree-org for the suggestion.
This commit is contained in:
Tim Graham 2018-01-11 06:48:29 -05:00 committed by GitHub
parent f636f0bb86
commit 7c00f9fb1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 4 deletions

View File

@ -908,8 +908,10 @@ loaders that come with Django:
``Template`` in memory. The cached ``Template`` instance is returned for
subsequent requests to load the same template.
This loader is automatically enabled if :setting:`DEBUG` is ``False`` and
:setting:`OPTIONS['loaders'] <TEMPLATES-OPTIONS>` isn't specified.
This loader is automatically enabled if :setting:`OPTIONS['loaders']
<TEMPLATES-OPTIONS>` isn't specified and :setting:`OPTIONS['debug']
<TEMPLATES-OPTIONS>` is ``False`` (the latter option defaults to the value
of :setting:`DEBUG`).
You can also enable template caching with some custom template loaders
using settings like this::

View File

@ -698,8 +698,9 @@ Miscellaneous
1.0) is removed.
* The :class:`cached template loader <django.template.loaders.cached.Loader>`
is now enabled if :setting:`DEBUG` is ``False`` and
:setting:`OPTIONS['loaders'] <TEMPLATES-OPTIONS>` isn't specified. This could
is now enabled if :setting:`OPTIONS['loaders'] <TEMPLATES-OPTIONS>` isn't
specified and :setting:`OPTIONS['debug'] <TEMPLATES-OPTIONS>` is ``False``
(the latter option defaults to the value of :setting:`DEBUG`). This could
be backwards-incompatible if you have some :ref:`template tags that aren't
thread safe <template_tag_thread_safety>`.