Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Cannot override blocks in included templates #169

Closed
dwt opened this Issue · 2 comments

3 participants

@dwt
dwt commented

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.

@mitsuhiko mitsuhiko closed this
@mitsuhiko
Owner

Duplicate.

@rbu

of?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.