﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
28825	Templated email with {% extends parent_name %} doesn't re-resolve the base template	Andrew	nobody	"In django templating you can use `{% extends parent_name %}` to indicate that the template is derived from another.  We use this feature along with django-templated-email to have different base email templates for white-label purposes.  

The issue appears to be that `{% extends parent_name %}` does not get re-evaluated  when the variable changes, eg. from `email/app1.email` to `email/app2.email`.  

* The Engine uses `django.template.loaders.cached.Loader`
* The first time the template is loaded, the parent template is loaded based on `parent_name` is loaded
* Subsequent emails load the template, but do not re-evaluate the `extends`

----

If this is as-designed, how would one go about clearing out that cache?  When setting up my test case I call the code below,  but it doesn't appear to clear the cache, even though my `print()` debugging shows its the same object (`<django.template.loaders.cached.Loader object at 0x113e99828>`_

{{{
for template in engines.all():
    for loader in template.engine.template_loaders:
        loader.reset()
        for x in loader.loaders:
            x.reset()
}}}"	Uncategorized	closed	Template system	1.11	Normal	invalid		awbacker@…	Unreviewed	0	0	0	0	0	0
