If template_partials is not the first entry in settings.INSTALLED_APPS, the template engine's loaders might be set already due to another app importing django.template. For example, if slippers comes before template_partials.
In that case, wrap_loader() needs to clear the cached engine definitions and force EngineHandler to read the settings again.
If
template_partials
is not the first entry insettings.INSTALLED_APPS
, the template engine's loaders might be set already due to another app importingdjango.template
. For example, ifslippers
comes beforetemplate_partials
.In that case,
wrap_loader()
needs to clear the cached engine definitions and force EngineHandler to read the settings again.