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: | 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 |
Description
Simple example:
#parent.html
{% block parent %}
{% url "no reverse match" %} <- no reverse found, error
{% endblock parent %}
#child.html
{% extends "parent.html" %}
{% block parent %}
{{block.super}}
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 , 11 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:3 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Could be. In any case this issue is already fixed in 1.6.x and master.
I agree that this is not somewhere that we should be swallowing errors.