Skip to main content

TemplateDoesNotExist

The exception used when a template does not exist.

Attributes

AttributeTypeDescription
backendclass = nullThe template backend class used when raising this exception.
triedlist = []A list of sources that were tried when finding the template, formatted as a list of (origin, status) tuples.
chainlist = []A list of intermediate TemplateDoesNotExist exceptions used to encapsulate multiple exceptions when loading templates from multiple engines.

Constructor

Signature

def TemplateDoesNotExist(
msg: string,
tried: list = None,
backend: object = None,
chain: list = None
) - > null

Parameters

NameTypeDescription
msgstringThe error message describing the missing template.
triedlist = NoneA list of (origin, status) tuples representing sources that were searched.
backendobject = NoneThe template backend class that raised the exception.
chainlist = NoneA list of intermediate TemplateDoesNotExist exceptions from multiple engines.

Signature

def TemplateDoesNotExist(
msg: string,
tried: list,
backend: object,
chain: list
) - > null

Parameters

NameTypeDescription
msgstringThe error message describing the template lookup failure.
triedlistA list of (origin, status) tuples representing the sources searched and the specific reasons for failure at each location.
backendobjectThe template backend instance or class that was active when the exception was raised.
chainlistA list of underlying TemplateDoesNotExist exceptions encountered when attempting to load templates from multiple engines.