Changes between Initial Version and Version 2 of Ticket #25701
- Timestamp:
- Nov 7, 2015, 9:53:29 AM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #25701
- Property Cc added
- Property Owner changed from to
- Property Status new → assigned
-
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.1 If 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. 2 2 3 3 While 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.