extends, defined block multiple time
See original GitHub issuefile1.html
{% block test %}
file1
{% endblock %}
file2.html
{% extends "file1.html" %}
{% if true %}
{% block test %}
file2 block1
{% endblock %}
{% else %}
{% block test %}
file2 block2
{% endblock %}
{% endblock %}
expected: file2 block 1
actual: file2 block 2
the precompiled js-file for file2.html
contains the function for the test-block twice with the same name so the last defined instance of the block get called regardless of what case the if falls into.
Issue Analytics
- State:
- Created 8 years ago
- Comments:18 (6 by maintainers)
Top Results From Across the Web
extends
You can't define multiple block tags with the same name in the same template. This limitation exists because a block tag works in...
Read more >The scope of names defined in class block doesn't extend to ...
If the definition occurs in a function block, the scope extends to any blocks contained within the defining one, unless a contained block...
Read more >Reusing code with extends | Looker - Google Cloud
Extending more than one object at the same time ... The extension process works exactly as described in the implementation example, but there...
Read more >Catching Multiple Exception Types and Rethrowing ...
In Java SE 7 and later, a single catch block can handle more than one type of exception. ... static class FirstException extends...
Read more >RFC 3611 - RTP Control Protocol Extended Reports (RTCP XR)
Section 4 defines several specific report block types. ... An RTP data sender that receives a Receiver Reference Time Report Block can respond...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
this now throws but doesn’t implement
self
, makes it impossible to render the same block two times (and used to work)Same problem, I used this to render a block twice, and now it breaks.