Creates a template object from a module. This is used by the module loader to create a template object. .. versionadded:: 2.4
(
cls,
environment: Environment,
module_dict: t.MutableMapping[str, t.Any],
globals: t.MutableMapping[str, t.Any],
)
| 1232 | |
| 1233 | @classmethod |
| 1234 | def from_module_dict( |
| 1235 | cls, |
| 1236 | environment: Environment, |
| 1237 | module_dict: t.MutableMapping[str, t.Any], |
| 1238 | globals: t.MutableMapping[str, t.Any], |
| 1239 | ) -> "Template": |
| 1240 | """Creates a template object from a module. This is used by the |
| 1241 | module loader to create a template object. |
| 1242 | |
| 1243 | .. versionadded:: 2.4 |
| 1244 | """ |
| 1245 | return cls._from_namespace(environment, module_dict, globals) |
| 1246 | |
| 1247 | @classmethod |
| 1248 | def _from_namespace( |