You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems {% style "some/style.css" %} tags don't render within {{ block.super }} calls, while explicit <link ... /> tags render as expected within a {{ block.super }} call.
For example, here's a cascading a->b->c hierarchy, each which includes 2 stylesheets in the block head: one named "*-style.css" rendered with a {% style ... %} tag, and the other "*-link.css" rendered with an explicit <link ... /> tag.
The final child, c, is the only one which renders a link from the "*-style.css" tag. The parents do not, even though each child calls {{ block.super }}. However, the explicit <link ... /> tags are rendered by the {{ block.super }} calls.
Is it intended that style tags do not render within {{ block.super }}? If so, is it an intentional behavior that applies to other tags as well? I've only tested with style so far.
It's been a little while, I'll have to take a look at the specifics, but I suspect it's due to the fact that tags get run at compile time, while block.super operates at runtime on the compiled template.
It seems
{% style "some/style.css" %}
tags don't render within{{ block.super }}
calls, while explicit<link ... />
tags render as expected within a{{ block.super }}
call.For example, here's a cascading a->b->c hierarchy, each which includes 2 stylesheets in the block
head
: one named"*-style.css"
rendered with a{% style ... %}
tag, and the other"*-link.css"
rendered with an explicit<link ... />
tag.The final child, c, is the only one which renders a link from the
"*-style.css"
tag. The parents do not, even though each child calls{{ block.super }}
. However, the explicit<link ... />
tags are rendered by the{{ block.super }}
calls.a.html
b.html
c.html
I just ran this in a repl for a quick test, here's the output:
Is it intended that style tags do not render within
{{ block.super }}
? If so, is it an intentional behavior that applies to other tags as well? I've only tested withstyle
so far.I also dumped a minimal repro here.
The text was updated successfully, but these errors were encountered: