Changes between Initial Version and Version 2 of Ticket #25701


Ignore:
Timestamp:
Nov 7, 2015, 9:53:29 AM (9 years ago)
Author:
Jacinda Shelly
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #25701

    • Property Cc jacinda.shelly@… added
    • Property Owner changed from nobody to Jacinda Shelly
    • Property Status newassigned
  • Ticket #25701 – Description

    initial v2  
    1 If you use a related field in a callable, and then use that callable in list_display, Django doesn't currently have a way to automatically detect that select_related should be used and performs a query for every row in the list.
     1If you use a related field in a callable on a Model or ModelAdmin, and then use that callable in list_display, Django doesn't currently have a way to automatically detect that select_related should be used and performs a query for every row in the list.
    22
    33While it might be possible to do this automatically, a quick way to help with this problem would be to warn a developer with something like django.contrib.messages (if enabled) that a list_view is performing O(n) queries and that they should investigate this as a potential performance issue.
Back to Top