MCPcopy
hub / github.com/django/django / TemplateDoesNotExist

Class TemplateDoesNotExist

django/template/exceptions.py:9–36  ·  view source on GitHub ↗

The exception used when a template does not exist. Optional arguments: backend The template backend class used when raising this exception. tried A list of sources that were tried when finding the template. This is formatted as a list of tuples containing (orig

Source from the content-addressed store, hash-verified

7
8
9class TemplateDoesNotExist(Exception):
10 """
11 The exception used when a template does not exist. Optional arguments:
12
13 backend
14 The template backend class used when raising this exception.
15
16 tried
17 A list of sources that were tried when finding the template. This
18 is formatted as a list of tuples containing (origin, status), where
19 origin is an Origin object or duck type and status is a string with the
20 reason the template wasn't found.
21
22 chain
23 A list of intermediate TemplateDoesNotExist exceptions. This is used to
24 encapsulate multiple exceptions when loading templates from multiple
25 engines.
26 """
27
28 def __init__(self, msg, tried=None, backend=None, chain=None):
29 self.backend = backend
30 if tried is None:
31 tried = []
32 self.tried = tried
33 if chain is None:
34 chain = []
35 self.chain = chain
36 super().__init__(msg)
37
38
39class TemplateSyntaxError(Exception):

Callers 10

get_templateMethod · 0.90
get_templateMethod · 0.90
get_contentsMethod · 0.90
get_contentsMethod · 0.90
get_templateMethod · 0.90
get_templateFunction · 0.85
select_templateFunction · 0.85
find_templateMethod · 0.85
get_templateMethod · 0.85
select_templateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected