This method works like the :attr:`module` attribute when called without arguments but it will evaluate the template on every call rather than caching it. It's also possible to provide a dict which is then used as context. The arguments are the same as for the :meth:
(
self,
vars: t.Optional[t.Dict[str, t.Any]] = None,
shared: bool = False,
locals: t.Optional[t.Mapping[str, t.Any]] = None,
)
| 1390 | ) |
| 1391 | |
| 1392 | def make_module( |
| 1393 | self, |
| 1394 | vars: t.Optional[t.Dict[str, t.Any]] = None, |
| 1395 | shared: bool = False, |
| 1396 | locals: t.Optional[t.Mapping[str, t.Any]] = None, |
| 1397 | ) -> "TemplateModule": |
| 1398 | """This method works like the :attr:`module` attribute when called |
| 1399 | without arguments but it will evaluate the template on every call |
| 1400 | rather than caching it. It's also possible to provide |
| 1401 | a dict which is then used as context. The arguments are the same |
| 1402 | as for the :meth:`new_context` method. |
| 1403 | """ |
| 1404 | ctx = self.new_context(vars, shared, locals) |
| 1405 | return TemplateModule(self, ctx) |
| 1406 | |
| 1407 | async def make_module_async( |
| 1408 | self, |
no test coverage detected