diff options
| author | Tim Graham <timograham@gmail.com> | 2018-01-11 06:48:29 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2018-01-11 06:52:58 -0500 |
| commit | 3d144787c9d80b868ecbef348049275493f5fc78 (patch) | |
| tree | 8ad2af8e58428365910e218c178f431802d9b1cc | |
| parent | 26a20e4fba1a3ec0dd70c51d52ea26d8d1bf73d9 (diff) | |
[2.0.x] Fixed #29002 -- Corrected cached template loader docs about when it's automatically enabled.
Thanks oTree-org for the suggestion.
Backport of 7c00f9fb1cc47e1c993f7728e2b592a1be29dd40 from master
| -rw-r--r-- | docs/ref/templates/api.txt | 6 | ||||
| -rw-r--r-- | docs/releases/1.11.txt | 5 |
2 files changed, 7 insertions, 4 deletions
diff --git a/docs/ref/templates/api.txt b/docs/ref/templates/api.txt index 62322b5a21..6bc94887e9 100644 --- a/docs/ref/templates/api.txt +++ b/docs/ref/templates/api.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:: diff --git a/docs/releases/1.11.txt b/docs/releases/1.11.txt index 9e84b869d3..1803a3ae62 100644 --- a/docs/releases/1.11.txt +++ b/docs/releases/1.11.txt @@ -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>`. |
