diff options
Diffstat (limited to '')
-rw-r--r-- | askama/src/lib.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/askama/src/lib.rs b/askama/src/lib.rs index e70194b..9126a99 100644 --- a/askama/src/lib.rs +++ b/askama/src/lib.rs @@ -105,6 +105,8 @@ //! //! The `block` tags define three blocks that can be filled in by child //! templates. The base template defines a default version of the block. +//! A base template must define one or more blocks in order to be enable +//! inheritance. //! //! ### Child template //! @@ -133,6 +135,11 @@ //! have a field called `_parent` of the type used as the base template //! context. Blocks can only refer to the context of their own template. //! +//! Note that, if the base template lives in another module than the child +//! template, the child template's module should import all symbols from the +//! base template's module in order for it to find the trait definition that +//! supports the inheritance mechanism. +//! //! ## HTML escaping //! //! Askama does not yet support automatic escaping. Care must be taken to |