﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
29399	Template rendering errors are incorrectly blamed on base template	oTree-org	nobody	"Repro steps: 

- create a ""base.html""
- create a ""child.html"" that inherits from base.html with `{% extends %}`

put one of the following lines child.html:

    `{% url 'nonexistent' %}`
    `{% include 'nonexistent.html' %}`

Expected: the yellow error page's ""template debug"" context should highlight the offending line, as it does when you have a TemplateSyntaxError during compilation.

Actual: the error page incorrectly blames base.html, and says the error is at line 0:

""Error during template rendering
In template ...\base.html, error at line 0""

It then shows the first 10 lines of base.html, but of course there is no error there.

I think this is caused by `django.template.base.Node.render_annotated`, specifically this line:

`e.template_debug = context.render_context.template.get_exception_info(e, self.token)`

It seems fixed if I change it to:

`e.template_debug = context.template.get_exception_info(e, self.token)`

(I got the idea because I saw `context.template` referenced on the previous line.)

You can run the attached project which reproduces the issue (run server and open to /)."	Bug	closed	Template system	2.0	Normal	duplicate			Unreviewed	0	0	0	0	0	0
