Method: flask.templating.DispatchingJinjaLoader._get_source_explained
Calls: 1, Exceptions: 1, Paths: 1Back
Path 1: 1 calls (1.0)
Environment (1)
'missing_template.html' (1)
TemplateNotFound (1)
1def _get_source_explained(
2 self, environment: Environment, template: str
3 ) -> tuple[str, str | None, t.Callable | None]:
4 attempts = []
5 rv: tuple[str, str | None, t.Callable[[], bool] | None] | None
6 trv: None | (tuple[str, str | None, t.Callable[[], bool] | None]) = None
7
8 for srcobj, loader in self._iter_loaders(template):
9 try:
10 rv = loader.get_source(environment, template)
11 if trv is None:
12 trv = rv
13 except TemplateNotFound:
14 rv = None
15 attempts.append((loader, srcobj, rv))
16
17 from .debughelpers import explain_template_loading_attempts
18
19 explain_template_loading_attempts(self.app, template, attempts)
20
21 if trv is not None:
22 return trv
23 raise TemplateNotFound(template)