              template = get_template(template_name, using=using)
          return template.render(context, request)
  
      else:
          tried = []
          # Some deprecated arguments were passed - use the legacy code path
          for engine in _engine_list(using):
              try:
                  # This is required for deprecating properly arguments specific
                  # to Django templates. Remove Engine.render_to_string() at the
 
</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     This exception is raised when a template cannot be found.
 </s> add     This exception is raised when a template cannot be found. It accepts the
    following optional arguments for populating the :ref:`template postmortem
    <template-postmortem>` on the debug page:
        chain = []
              template = get_template(template_name, using=using)
          return template.render(context, request)
  
      else:
        chain = []
          # Some deprecated arguments were passed - use the legacy code path
          for engine in _engine_list(using):
              try:
                  # This is required for deprecating properly arguments specific
                  # to Django templates. Remove Engine.render_to_string() at the
keep keep keep keep replace keep keep keep keep keep
 Fixed #24119, #24120 -- Formalized debug integration for template backends. 
django/template/loader.py