      Tries names in order and returns the first template found.
  
      Raises TemplateDoesNotExist if no such template exists.
      """
      tried = []
      engines = _engine_list(using)
      for template_name in template_name_list:
          for engine in engines:
              try:
                  # This is required for deprecating the dirs argument. Simply
 
</s> remove     tried = []
 </s> add     chain = [] </s> remove         tried = []
 </s> add         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] </s> remove     raise TemplateDoesNotExist(template_name, tried=tried)
 </s> add     raise TemplateDoesNotExist(template_name, chain=chain) </s> remove             <p class="postmortem-section">Using engine <code>{{ entry.engine.name }}</code>:</p>
 </s> add             <p class="postmortem-section">Using engine <code>{{ entry.backend.name }}</code>:</p>
    chain = []
      Tries names in order and returns the first template found.
  
      Raises TemplateDoesNotExist if no such template exists.
      """
    chain = []
      engines = _engine_list(using)
      for template_name in template_name_list:
          for engine in engines:
              try:
                  # This is required for deprecating the dirs argument. Simply
keep keep keep keep replace keep keep keep keep keep
 Fixed #24119, #24120 -- Formalized debug integration for template backends. 
django/template/loader.py