Closed
Description
Tested with:
views.py
from test_debug_toolbar.models import Question
def index(request):
return render(request, 'index.html', {'questions': Question.objects.all()})
index.html
{% extends 'base.html' %}
{% block content %}
<h5>Hello there! This is a test for debug toolbar.</h5>
<p>Below is an included template that makes a SQL query. But in debug toolbar, it is signified in "index.html", while it should be in "inner.html".</p>
{% include 'inner.html' %}
{% endblock content %}
inner.html
<p>Here's inner.html:</p>
<p>All questions:</p>
{{ questions }}
The SQL query of Question.objects.all()
is executed at the line 5 of inner.html
, but in the SQL panel, it is incorrectly pointed to the line 5 of its parent template index.html
:
Tested with current master and develop branch, and Django 1.10.4.
For the complete test Django project: https://github.com/lingxiaoyang/test_debug_toolbar
Metadata
Metadata
Assignees
Labels
No labels