[Django] #26145: Not all SQL Queries included in sql_queries context variable

4 views
Skip to first unread message

Django

unread,
Jan 27, 2016, 7:21:20 AM1/27/16
to django-...@googlegroups.com
#26145: Not all SQL Queries included in sql_queries context variable
------------------------------+-------------------------
Reporter: inoks | Owner: nobody
Type: Bug | Status: new
Component: Core (Other) | Version: 1.9
Severity: Normal | Keywords: sql_queries
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+-------------------------
sql_queries template variable represents only connections to default
database.


{{{
context_extras['sql_queries'] = lazy(lambda: connection.queries, list)
}}}

https://github.com/django/django/blob/917100eed7ba2f0aca2c1a5b64821c8ba5cc1bcc/django/template/context_processors.py#L46

Expected to represent queries from all connected DB's.

--
Ticket URL: <https://code.djangoproject.com/ticket/26145>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jan 27, 2016, 7:21:30 AM1/27/16
to django-...@googlegroups.com
#26145: Not all SQL Queries included in sql_queries context variable
------------------------------+--------------------------------------

Reporter: inoks | Owner: nobody
Type: Bug | Status: new
Component: Core (Other) | Version: 1.9
Severity: Normal | Resolution:

Keywords: sql_queries | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
------------------------------+--------------------------------------
Changes (by inoks):

* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/26145#comment:1>

Django

unread,
Jan 27, 2016, 9:16:27 AM1/27/16
to django-...@googlegroups.com
#26145: Not all SQL Queries included in sql_queries context variable
------------------------------+--------------------------------------

Reporter: inoks | Owner: nobody
Type: Bug | Status: new
Component: Core (Other) | Version: 1.9
Severity: Normal | Resolution:

Keywords: sql_queries | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
------------------------------+--------------------------------------

Comment (by timgraham):

I wonder if there's much value in enhancing that template tag. I think the
[https://django-debug-toolbar.readthedocs.org/en/latest/panels.html#sql
Django debug toolbar] is a better solution these days. Have you tried it?

--
Ticket URL: <https://code.djangoproject.com/ticket/26145#comment:2>

Django

unread,
Jan 27, 2016, 9:26:25 AM1/27/16
to django-...@googlegroups.com
#26145: Not all SQL Queries included in sql_queries context variable
------------------------------+--------------------------------------

Reporter: inoks | Owner: nobody
Type: Bug | Status: new
Component: Core (Other) | Version: 1.9
Severity: Normal | Resolution:

Keywords: sql_queries | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
------------------------------+--------------------------------------

Comment (by inoks):

Yes, sure i use Debug Toolbar as well, but some users like to have simple
solution for monitoring app DB's activity.

--
Ticket URL: <https://code.djangoproject.com/ticket/26145#comment:3>

Django

unread,
Jan 27, 2016, 10:13:57 AM1/27/16
to django-...@googlegroups.com
#26145: Made the debug context processor return queries for all databases
--------------------------------------+------------------------------------
Reporter: inoks | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Template system | Version: master
Severity: Normal | Resolution:
Keywords: sql_queries | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by timgraham):

* type: Bug => Cleanup/optimization
* component: Core (Other) => Template system
* version: 1.9 => master
* stage: Unreviewed => Accepted


Comment:

I'm not enthusiastic about it, but I guess it's fine.

--
Ticket URL: <https://code.djangoproject.com/ticket/26145#comment:4>

Django

unread,
Apr 9, 2016, 8:04:26 AM4/9/16
to django-...@googlegroups.com
#26145: Made the debug context processor return queries for all databases
-------------------------------------+-------------------------------------
Reporter: inoks | Owner:
Type: | MounirMesselmeni
Cleanup/optimization | Status: assigned

Component: Template system | Version: master
Severity: Normal | Resolution:
Keywords: sql_queries | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by MounirMesselmeni):

* status: new => assigned
* owner: nobody => MounirMesselmeni


--
Ticket URL: <https://code.djangoproject.com/ticket/26145#comment:5>

Django

unread,
Apr 9, 2016, 8:12:54 AM4/9/16
to django-...@googlegroups.com
#26145: Made the debug context processor return queries for all databases
-------------------------------------+-------------------------------------
Reporter: inoks | Owner:
Type: | MounirMesselmeni
Cleanup/optimization | Status: assigned
Component: Template system | Version: master
Severity: Normal | Resolution:
Keywords: sql_queries | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by MounirMesselmeni):

* has_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/26145#comment:6>

Django

unread,
Apr 9, 2016, 11:48:02 AM4/9/16
to django-...@googlegroups.com
#26145: Made the debug context processor return queries for all databases
-------------------------------------+-------------------------------------
Reporter: inoks | Owner:
Type: | MounirMesselmeni
Cleanup/optimization | Status: closed

Component: Template system | Version: master
Severity: Normal | Resolution: fixed

Keywords: sql_queries | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"03e1cc930c6a5fbe993fb120e4403f3dd8a7c211" 03e1cc93]:
{{{
#!CommitTicketReference repository=""
revision="03e1cc930c6a5fbe993fb120e4403f3dd8a7c211"
Fixed #26145 -- Made debug context processor return queries for all
databases.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/26145#comment:7>

Reply all
Reply to author
Forward
0 new messages