in the documentation about the cached template loader, a warning box
informs about thread safety concerns with template tags if using the
cached template loader.
https://docs.djangoproject.com/en/1.9/ref/templates/api/#django.template.loaders.cached.Loader
After locking into the code of the loader i could not find anything
related to multi thread template loading or anything like that.
https://github.com/django/django/blob/master/django/template/loaders/cached.py
So i think the cached loader is safe in a non-multi thread Django setup.
The warning in the documentation is only relevant for multi thread setups
of Django.
My recommendation:
Update the cached loader warning in the documentation to make clear, this
only applies to multi thread Django setups.
--
Ticket URL: <https://code.djangoproject.com/ticket/26240>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* needs_better_patch: => 0
* resolution: => worksforme
* needs_tests: => 0
* needs_docs: => 0
Comment:
If you click through to the "for more information" link, it does say,
"Since Django is sometimes run in multi-threaded..." This seems fine to
me.
--
Ticket URL: <https://code.djangoproject.com/ticket/26240#comment:1>