#27584: Template error raised in a parent template shows incorrect source
location
on debug page
---------------------------------+------------------------------------
Reporter: Bob | Owner: nobody
Type: Bug | Status: new
Component: Template system | Version: 1.10
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------
Comment (by Preston Timmons):
I see the problem.
The debug information is populated correctly if the error happens during
compilation time (when Template.compile_nodelist is called), but not at
render time (when Node.render_annotated is called). This is due to this
line:
https://github.com/django/django/blob/master/django/template/base.py#L963
The wrong source is used since context.template is always the parent
template.
It needs some clean up, but here's an approach to fix the problem:
https://github.com/django/django/pull/7686
--
Ticket URL: <https://code.djangoproject.com/ticket/27584#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/075.04688e9da555a7fef1f7371c460d2aa8%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.