                          "Skipping template backend %s because its render_to_string "
                          "method doesn't support the dictionary argument." %
                          engine.name, stacklevel=2)
              except TemplateDoesNotExist as e:
                  tried.extend(e.tried)
                  continue
  
          if template_name:
              if isinstance(template_name, (list, tuple)):
                  template_name = ', '.join(template_name)
 
</s> remove             raise TemplateDoesNotExist(template_name, tried=tried)
 </s> add             raise TemplateDoesNotExist(template_name, chain=chain) </s> remove                 tried.extend(e.tried)
 </s> add                 chain.append(e) </s> remove             tried.extend(e.tried)
 </s> add             chain.append(e) </s> remove         raise TemplateDoesNotExist(', '.join(template_name_list), tried=tried)
 </s> add         raise TemplateDoesNotExist(', '.join(template_name_list), chain=chain) </s> remove             postmortem = []

            # TODO: add support for multiple template engines (#24120).
            # TemplateDoesNotExist should carry all the information, including
            # the backend, rather than looping through engines.all.
            for engine in engines.all():
                if hasattr(engine, 'engine'):
                    e = engine.engine
                else:
                    e = engine

                postmortem.append(dict(
                    engine=engine,
                    tried=[
                        entry for entry in self.exc_value.tried if
                        entry[0].loader.engine == e
                    ],
                ))
            self.postmortem = postmortem
 </s> add             self.postmortem = self.exc_value.chain or [self.exc_value]
                chain.append(e)
                          "Skipping template backend %s because its render_to_string "
                          "method doesn't support the dictionary argument." %
                          engine.name, stacklevel=2)
              except TemplateDoesNotExist as e:
                chain.append(e)
                  continue
  
          if template_name:
              if isinstance(template_name, (list, tuple)):
                  template_name = ', '.join(template_name)
keep keep keep keep replace keep keep keep keep keep
 Fixed #24119, #24120 -- Formalized debug integration for template backends. 
django/template/loader.py