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
| 7 | |
| 8 | |
| 9 | class 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 | |
| 39 | class TemplateSyntaxError(Exception): |
no outgoing calls
no test coverage detected