Opened 11 years ago

Closed 11 years ago

#21184 closed Bug (fixed)

block.super does not render with reverse errors in super block

Reported by: schrinaw@… Owned by: nobody
Component: Template system Version: 1.5
Severity: Normal Keywords: block.super
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Simple example:
{% block parent %}
{% url "no reverse match" %} <- no reverse found, error
{% endblock parent %}

{% extends "parent.html" %}
{% block parent %}
some other stuff
{% endblock parent %}

Rendering child.html, the block.super part does not appear. It fails "silently" rather than throwing the "no reverse match" error. Not sure if this is the intended behavior (why??), but it has caused me an hour of frustrating template debugging in two cases now. It was only when I moved the whole parent block into the child template (ie copy/paste) that the "no reverse match" error surfaced. I thought I had a problem with template inheritance the whole time.

Change History (3)

comment:1 by Marc Tamlyn, 11 years ago

Triage Stage: UnreviewedAccepted

I agree that this is not somewhere that we should be swallowing errors.

comment:2 by Baptiste Mispelon, 11 years ago

Is this related to #20745?

comment:3 by Ramiro Morales, 11 years ago

Resolution: fixed
Status: newclosed

Could be. In any case this issue is already fixed in 1.6.x and master.

Note: See TracTickets for help on using tickets.
Back to Top