Permalink
Browse files

[2.0.x] Fixed #29002 -- Corrected cached template loader docs about w…

…hen it's automatically enabled.

Thanks oTree-org for the suggestion.

Backport of 7c00f9f from master
  • Loading branch information...
timgraham committed Jan 11, 2018
1 parent 26a20e4 commit 3d144787c9d80b868ecbef348049275493f5fc78
Showing with 7 additions and 4 deletions.
  1. +4 −2 docs/ref/templates/api.txt
  2. +3 −2 docs/releases/1.11.txt
@@ -918,8 +918,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
@@ -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>`.

0 comments on commit 3d14478

Please sign in to comment.