We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
We're trying to override a block in an included template like this:
#included.jinja2 {% block master %} Default master content {% endblock %}
#base.jinja2 {% include "included.jinja2" %} {% include "included.jinja2" with context %} {% block master %} Fnord {% endblock master %}
#hello.jinja2 {% extends "base.jinja2" %} {% block master %} Overridden master content {% endblock master %}
When running the hello.jinja2 file we see this output
Default master content Default master content Overridden master content
I would have expected at least the second default master content to be replaced by the overriden content.
That I think is the bug.
The text was updated successfully, but these errors were encountered:
Duplicate.
Sorry, something went wrong.
of?
Edit: Which issue is this a duplicate of?
ugh, to make matters worse, Django templates don't do it either (see note at the end: https://docs.djangoproject.com/en/1.11/ref/templates/builtins/#include)
i thought maybe jinja2 would, it'd save me a heck of a lot of duplication >_<
anyway, I guess I'll just have to find a way to simplify stuff down :(
No branches or pull requests
We're trying to override a block in an included template like this:
When running the hello.jinja2 file we see this output
I would have expected at least the second default master content to be replaced by the overriden content.
That I think is the bug.
The text was updated successfully, but these errors were encountered: