Classes
TemplateInheritanceMixin
3
▼
Mixin for inherited block resolution.
Adds _build_local_block_maps, _inheritance_chain, _effective…
TemplateInheritanceMixin
3
▼
Mixin for inherited block resolution.
Adds _build_local_block_maps, _inheritance_chain, _effective_block_map.
Methods
Internal Methods 3 ▼
_build_local_block_maps
1
tuple[dict[str, Any], di…
▼
Precompute per-template block function maps from compiled namespace.
staticmethod
_build_local_block_maps
1
tuple[dict[str, Any], di…
▼
def _build_local_block_maps(namespace: dict[str, Any]) -> tuple[dict[str, Any], dict[str, Any], dict[str, Any]]
Parameters
| Name | Type | Description |
|---|---|---|
namespace |
— |
Returns
tuple[dict[str, Any], dict[str, Any], dict[str, Any]]
_inheritance_chain
0
tuple[Template, ...] | l…
▼
Return [self, parent, grandparent, ...] for inherited block resolution.
_inheritance_chain
0
tuple[Template, ...] | l…
▼
def _inheritance_chain(self) -> tuple[Template, ...] | list[Any]
Returns
tuple[Template, ...] | list[Any]
_effective_block_map
1
dict[str, Any]
▼
Build nearest-child-wins block map for render_block inheritance.
kind: "sync" …
_effective_block_map
1
dict[str, Any]
▼
def _effective_block_map(self, kind: str) -> dict[str, Any]
Build nearest-child-wins block map for render_block inheritance.
kind: "sync" | "stream" | "async_stream" Returns dict of block_name -> callable for that kind.
Parameters
| Name | Type | Description |
|---|---|---|
kind |
— |
Returns
dict[str, Any]