class_docstr: Like :class:`TemplateNotFound` but raised if multiple templates
  are selected.  This is a subclass of :class:`TemplateNotFound`
  exception, so just catching the base exception will catch both.
  
  .. versionchanged:: 2.11
      If a name in the list of names is :class:`Undefined`, a message
      about it being undefined is shown rather than the empty string.
  
  .. versionadded:: 2.2
class_docstr_tok: ["Like",":","class",":","`","TemplateNotFound","`","but","raised","if","multiple","templates","are","selected",".","This","is","a","subclass","of",":","class",":","`","TemplateNotFound","`","exception",",","so","just","catching","the","base","exception","will","catch","both",".","..","versionchanged",":",":","2.11","If","a","name","in","the","list","of","names","is",":","class",":","`","Undefined","`",",","a","message","about","it","being","undefined","is","shown","rather","than","the","empty","string",".","..","versionadded",":",":","2.2"]
code: def __init__(self, names=(), message=None):
      if message is None:
          from .runtime import Undefined
  
          parts = []
  
          for name in names:
              if isinstance(name, Undefined):
                  parts.append(name._undefined_message)
              else:
                  parts.append(name)
  
          message = (
              "none of the templates given were found: "
              + ", ".join(imap(text_type, parts))
          )
      TemplateNotFound.__init__(
          self, names and names[-1] or None, message
      )
      self.templates = list(names)
  
imports: from ._compat import imap
  from ._compat import implements_to_string
  from ._compat import PY2
  from ._compat import text_type
label_desc: Use image node_id 1 to create a new TemplatesNotFound object from inherited base classes: TemplateNotFound with example: obj = TemplatesNotFound(names, message)