aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2017-08-08 12:43:12 +0200
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2017-08-08 12:43:12 +0200
commit52dee62de887f2eb455223ebce9a6dd3ef1aebe8 (patch)
tree0f26e046afa41bcb2810e7eb22889d2f2c801fd4
parent2b8c71c4c046f06fd246090f12f93fa08751f6e2 (diff)
downloadaskama-52dee62de887f2eb455223ebce9a6dd3ef1aebe8.tar.gz
askama-52dee62de887f2eb455223ebce9a6dd3ef1aebe8.tar.bz2
askama-52dee62de887f2eb455223ebce9a6dd3ef1aebe8.zip
Update documentation on inheritance
Diffstat (limited to '')
-rw-r--r--askama/src/lib.rs12
1 files changed, 7 insertions, 5 deletions
diff --git a/askama/src/lib.rs b/askama/src/lib.rs
index 9126a99..8a431c5 100644
--- a/askama/src/lib.rs
+++ b/askama/src/lib.rs
@@ -129,11 +129,13 @@
//! ```
//!
//! The `extends` tag tells the code generator that this template inherits
-//! from another template. It will render the top-level content from the
-//! base template, and substitute blocks from the base template with those
-//! from the child template. The inheriting template context `struct` must
-//! 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.
+//! from another template. It will search for the base template relative to
+//! itself before looking relative to the template base directory. It will
+//! render the top-level content from the base template, and substitute
+//! blocks from the base template with those from the child template. The
+//! inheriting template context `struct` must have a field called `_parent` of
+//! the type used as the base template context. Blocks can refer to the context
+//! of both parent and child 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