Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allowing block overrides in include tags causes unexpected behavior. #243

Closed
navilan opened this issue Jun 10, 2013 · 5 comments
Closed

Comments

@navilan
Copy link

navilan commented Jun 10, 2013

See #84 (comment) for details.

mitsuhiko added a commit that referenced this issue Aug 7, 2013
This reverts commit 33aee12.

This fixes #243.
@mitsuhiko
Copy link
Contributor

Reverted, going to be in next maintenance release.

navilan added a commit to hyde/hyde that referenced this issue Aug 20, 2013
*   Bugfix: Fix smartypants to 1.7.x to avoid the breaking
    changes in 1.8.  (Issue #229)
*   Bugfix: Upgrade Jinja to 2.7.1 - this fixes
    pallets/jinja#243.
@milesrichardson
Copy link

Was this ever fixed? I am still experiencing this bug (same as #169 and #84).

magopian added a commit to mozilla/addons-server that referenced this issue Aug 17, 2015
This reverts commit 832dbf6.

Blocks that are inside included templates aren't overriden (see
pallets/jinja#243)
@kevinisaac
Copy link

The bug still exists.

@ntcong
Copy link

ntcong commented Jun 3, 2016

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.

@Dmitri-Sintsov
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants