See https://github.com/mitsuhiko/jinja2/pull/84#issuecomment-19208621 for details.
Reverted, going to be in next maintenance release.
Was this ever fixed? I am still experiencing this bug (same as #169 and #84).
The bug still exists.
This bug was fixed. Originally #84 introduced block overrides in include tags and got merged later, but it has since broke some templates setup (recursion on duplicated block), hence this issue.
Because the template behavior should not be changed, @mitsuhiko revert the patch.
If you want to support block overrides, please make a new issue, and maybe a proposed working solution.
It should be such easy to provide include with block overrides while keeping compatibility of current implementation of include just by using different template tag name:
{% include 'file.jinja2' %}
does not override included blocks, while:
{% include_override 'file.jinja2' %}
does the same.
It's very strange that such functionality is not implemented for such a long time, knowing how Jinja2 is very powerful in most of features, in fact one of the best template engines around, not just for Python.
Especially if there was actual patch done already.
Most helpful comment
It should be such easy to provide include with block overrides while keeping compatibility of current implementation of include just by using different template tag name:
does not override included blocks, while:
does the same.
It's very strange that such functionality is not implemented for such a long time, knowing how Jinja2 is very powerful in most of features, in fact one of the best template engines around, not just for Python.
Especially if there was actual patch done already.