#25701: Add warning to an admin list_view if too many queries are being used
-------------------------------+--------------------------------------
     Reporter:  jacinda        |                    Owner:  jacinda
         Type:  New feature    |                   Status:  assigned
    Component:  contrib.admin  |                  Version:
     Severity:  Normal         |               Resolution:
     Keywords:                 |             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):

 After some thought, I'm a bit hesitant to duplicate functionality (to some
 extent) provided by django-debug-toolbar. I think there's consensus to
 recommend that package in the docs (perhaps in the tutorial). While this
 will require the developer to understand things at a slightly deeper
 level, it seems like a more teachable solution in the long run. What do
 you think?

 One partial solution would be to use the checks framework (at the INFO
 level, perhaps) to detect relations in `list_display` that aren't in
 `list_select_related`. Of course this won't cover O(n) queries in
 callables, but I'm not yet convinced a more sophisticated solution is
 worthwhile. I guess your proposal would only work in DEBUG mode (which
 makes sense to me since we probably wouldn't want end users to see the
 warning) since `connection.queries` is disabled otherwise.

--
Ticket URL: <https://code.djangoproject.com/ticket/25701#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/065.985cfa0b0692c256ec54e2ddff95cf98%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to