carltongibson / django-template-partials

Reusable named inline partials for the Django Template Language.
MIT License
444 stars 16 forks source link

Fixed unsuccessful template loader wrapping #27

Closed jnns closed 10 months ago

jnns commented 11 months ago

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.