Skip to content

Global intrinsic functions like range not working in child template #166

Closed
@jpcima

Description

@jpcima

Hi, thanks for great work in the latest commits.
I find there remains an issue after applying the bugfixes.

In a child template, range-for appears non-working.
In the example, the first case is going to print Foo1,Foo2,Foo3,; but the same loop in an overriden block outputs nothing.

1.txt

{% block A %}
This is original block "A".
{% for i in range(3) %}Foo{{i+1}},{% endfor %}
{% endblock %}

2.txt

{% extends "1.txt" %}
{% block A %}
This is overriden block "A".
{% for i in range(3) %}Foo{{i+1}},{% endfor %}
{% endblock %}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions