aboutsummaryrefslogtreecommitdiffstats
path: root/askama_derive/src/lib.rs
diff options
context:
space:
mode:
authorLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2017-08-06 14:56:09 +0200
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2017-08-06 14:56:09 +0200
commit077c56c00782ff826e46258f678ef0f163f4e3cb (patch)
tree8bcbb6aa2e835cc742cf19de5e39280b5aa0e326 /askama_derive/src/lib.rs
parentb9cb5b82e6c87bf0f6037d097476d69f5241bf3a (diff)
downloadaskama-077c56c00782ff826e46258f678ef0f163f4e3cb.tar.gz
askama-077c56c00782ff826e46258f678ef0f163f4e3cb.tar.bz2
askama-077c56c00782ff826e46258f678ef0f163f4e3cb.zip
Use one way of finding templates on the path
Diffstat (limited to '')
-rw-r--r--askama_derive/src/lib.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/askama_derive/src/lib.rs b/askama_derive/src/lib.rs
index 153e352..5ee5a4c 100644
--- a/askama_derive/src/lib.rs
+++ b/askama_derive/src/lib.rs
@@ -66,7 +66,8 @@ fn get_template_meta(ast: &syn::DeriveInput) -> TemplateMeta {
/// value as passed to the `template()` attribute.
fn build_template(ast: &syn::DeriveInput) -> String {
let meta = get_template_meta(ast);
- let src = path::get_template_source(&meta.path);
+ let path = path::find_template_from_path(&meta.path, None);
+ let src = path::get_template_source(&path);
let nodes = parser::parse(&src);
if meta.print == "ast" || meta.print == "all" {
println!("{:?}", nodes);