I've noticed that when I extend a template that references an invalid url name, in debug mode, the error message doesn't highlight the erroneous line in the parent template, but rather shows a section of the child template.
For example if "base.html" is just:
{% block content %}{% endblock %}
<a href="{% url 'page_three' %}">Page Three</a>
And "page_one.html" is:
{% extends 'base.html' %}
{% block content %}<p>This is page one</p>{% endblock %}
when there is no url named "page_three", debug mode will show an error message entitled:
NoReverseMatch at /page_one/
Reverse for 'page_three' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: []
and show a few lines of page_one.html (instead of base.html, where the error originated). See attached screenshot for example.
Debug mode seems to do a fine job of highlighting the invalid line in the parent template for other errors, such as an {% if %} without an {% endif %} or an unrecognized tag (e.g. {% asdf %} ).
Is this a bug? Or at least a sorely missing feature? Am I crazy for thinking that this is not how this error should be displayed?