aboutsummaryrefslogtreecommitdiffstats
path: root/askama_derive
diff options
context:
space:
mode:
authorLibravatar Dirkjan Ochtman <dirkjan.ochtman@ing.com>2019-03-18 10:06:01 +0100
committerLibravatar Dirkjan Ochtman <dirkjan.ochtman@ing.com>2019-03-18 10:06:01 +0100
commitcdaf7ea35d98b6c2a4d11d57b60abf6c3ff5ccc2 (patch)
tree522122bd87f7c40f2bc7dcd4b50c6c522c7567c7 /askama_derive
parent88f49df0a6f6f585151711f1f45e8c450114f89e (diff)
downloadaskama-cdaf7ea35d98b6c2a4d11d57b60abf6c3ff5ccc2.tar.gz
askama-cdaf7ea35d98b6c2a4d11d57b60abf6c3ff5ccc2.tar.bz2
askama-cdaf7ea35d98b6c2a4d11d57b60abf6c3ff5ccc2.zip
Create heritage for extends-only templates (fixes #224)
Diffstat (limited to 'askama_derive')
-rw-r--r--askama_derive/src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/askama_derive/src/lib.rs b/askama_derive/src/lib.rs
index cf5ead9..2c02cb5 100644
--- a/askama_derive/src/lib.rs
+++ b/askama_derive/src/lib.rs
@@ -54,7 +54,7 @@ fn build_template(ast: &syn::DeriveInput) -> String {
}
let ctx = &contexts[&input.path];
- let heritage = if !ctx.blocks.is_empty() {
+ let heritage = if !ctx.blocks.is_empty() || ctx.extends.is_some() {
Some(Heritage::new(ctx, &contexts))
} else {
None