{{{
{% if False %}
{% block parent %}Foo{% endblock parent %}
{% endif %}
}}}
Foo gets output, which feels wrong. But according to Mariusz Felisiak's
response at https://code.djangoproject.com/ticket/33311, this is by
design.
It would be great if this could be added to the documentation on
[https://docs.djangoproject.com/en/4.0/ref/templates/language/#template-
inheritance Template Inheritance].
--
Ticket URL: <https://code.djangoproject.com/ticket/33317>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* owner: nobody => Vishal Pandey
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/33317#comment:1>
* stage: Unreviewed => Accepted
Comment:
Agreed, a small note
--
Ticket URL: <https://code.djangoproject.com/ticket/33317#comment:2>
* easy: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/33317#comment:3>
* owner: nobody => movileanuv
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/33317#comment:4>
Comment (by movileanuv):
Here is a link to my pull request :
https://github.com/django/django/pull/15865
--
Ticket URL: <https://code.djangoproject.com/ticket/33317#comment:5>
* has_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/33317#comment:6>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"2fac0a18081dcc77fc860c801e5d727dc90435b3" 2fac0a18]:
{{{
#!CommitTicketReference repository=""
revision="2fac0a18081dcc77fc860c801e5d727dc90435b3"
Fixed #33317 -- Added note about unconditional evaluation of {% block %}
tags.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33317#comment:7>
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"8a2e65c2e6ed7fb2607ebb70142ebf4488f15d41" 8a2e65c2]:
{{{
#!CommitTicketReference repository=""
revision="8a2e65c2e6ed7fb2607ebb70142ebf4488f15d41"
[4.1.x] Fixed #33317 -- Added note about unconditional evaluation of {%
block %} tags.
Backport of 2fac0a18081dcc77fc860c801e5d727dc90435b3 from main
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33317#comment:8>