mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	[2.0.x] Fixed #29002 -- Corrected cached template loader docs about when it's automatically enabled.
Thanks oTree-org for the suggestion.
Backport of 7c00f9fb1c from master
			
			
This commit is contained in:
		| @@ -918,8 +918,10 @@ loaders that come with Django: | |||||||
|     ``Template`` in memory. The cached ``Template`` instance is returned for |     ``Template`` in memory. The cached ``Template`` instance is returned for | ||||||
|     subsequent requests to load the same template. |     subsequent requests to load the same template. | ||||||
|  |  | ||||||
|     This loader is automatically enabled if :setting:`DEBUG` is ``False`` and |     This loader is automatically enabled if :setting:`OPTIONS['loaders'] | ||||||
|     :setting:`OPTIONS['loaders'] <TEMPLATES-OPTIONS>` isn't specified. |     <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 |     You can also enable template caching with some custom template loaders | ||||||
|     using settings like this:: |     using settings like this:: | ||||||
|   | |||||||
| @@ -698,8 +698,9 @@ Miscellaneous | |||||||
|   1.0) is removed. |   1.0) is removed. | ||||||
|  |  | ||||||
| * The :class:`cached template loader <django.template.loaders.cached.Loader>` | * The :class:`cached template loader <django.template.loaders.cached.Loader>` | ||||||
|   is now enabled if :setting:`DEBUG` is ``False`` and |   is now enabled if :setting:`OPTIONS['loaders'] <TEMPLATES-OPTIONS>` isn't | ||||||
|   :setting:`OPTIONS['loaders'] <TEMPLATES-OPTIONS>` isn't specified. This could |   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 |   be backwards-incompatible if you have some :ref:`template tags that aren't | ||||||
|   thread safe <template_tag_thread_safety>`. |   thread safe <template_tag_thread_safety>`. | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user