Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Issue #11

Rolled back the functionality added in r152 (Issue #9).
The idea of an auto-changing template root folder is going away 
because it is not the "Django way".  The Djnago way is to have
all include paths relative to a base folder (although they do
support many base folders, but I digress).

Trying to support both systems is too complex and introduces unnecessary
ambiguity about the current include path for those doing it the Django way.
  • Loading branch information...
commit 61e3c4503218e7af1b8cedf9f76b323566a3cb21 1 parent 4d43244
@gardenia gardenia authored
View
2  examples/docroot/path1/base1
@@ -1,4 +1,4 @@
-{% extends "../path2/base2" %}
+{% extends "path2/base2" %}
{% block title2 %}block title 2 from base1 {% endblock %}
View
2  examples/docroot/path1/template1
@@ -2,4 +2,4 @@ This is template 1.
{{ test_var }}
-{% include "../path2/template2" %}
+{% include "path2/template2" %}
View
6 src/erlydtl/erlydtl_compiler.erl
@@ -293,8 +293,7 @@ body_ast([{extends, {string_literal, _Pos, String}} | ThisParseTree], Context, T
with_dependency({File, CheckSum}, body_ast(ParentParseTree, Context#dtl_context{
block_dict = dict:merge(fun(_Key, _ParentVal, ChildVal) -> ChildVal end,
BlockDict, Context#dtl_context.block_dict),
- parse_trail = [File | Context#dtl_context.parse_trail],
- doc_root = filename:dirname(File)}, TreeWalker));
+ parse_trail = [File | Context#dtl_context.parse_trail]}, TreeWalker));
Err ->
throw(Err)
end
@@ -450,8 +449,7 @@ include_ast(File, Context, TreeWalker) ->
case parse(FilePath, Context) of
{ok, InclusionParseTree, CheckSum} ->
with_dependency({FilePath, CheckSum}, body_ast(InclusionParseTree, Context#dtl_context{
- parse_trail = [FilePath | Context#dtl_context.parse_trail],
- doc_root = filename:dirname(FilePath) }, TreeWalker));
+ parse_trail = [FilePath | Context#dtl_context.parse_trail]}, TreeWalker));
Err ->
throw(Err)
end.
Please sign in to comment.
Something went wrong with that request. Please try again.