MCPcopy
hub / github.com/pallets/flask / list_templates

Method list_templates

src/flask/templating.py:112–124  ·  src/flask/templating.py::DispatchingJinjaLoader.list_templates
(self)

Source from the content-addressed store, hash-verified

110 yield blueprint, loader
111
112 def list_templates(self) -> list[str]:
113 result = set()
114 loader = self.app.jinja_loader
115 if loader is not None:
116 result.update(loader.list_templates())
117
118 for blueprint in self.app.iter_blueprints():
119 loader = blueprint.jinja_loader
120 if loader is not None:
121 for template in loader.list_templates():
122 result.add(template)
123
124 return list(result)
125
126
127def _render(app: Flask, template: Template, context: dict[str, t.Any]) -> str:

Callers 1

test_templates_listFunction · 0.80

Calls 3

setFunction · 0.85
iter_blueprintsMethod · 0.80
addMethod · 0.80

Tested by 1

test_templates_listFunction · 0.64