Add ModelAdmin.get_list_select_related()
Since other list options such as list_display has a corresponding dynamic function such as get_list_display, select_related should have the same to dynamically specify the related models to retrieve.
Use case: If you dynamically include foreign key columns in list_display, then you would like the ability to dynamically specify the select_related also. Otherwise the queries are not as efficient as select_related allows them to be.
Change History
(6)
Type: |
Uncategorized → Bug
|
Component: |
Uncategorized → contrib.admin
|
Summary: |
Django admin opton get_list_select_related is missing → Add ModelAdmin.get_list_select_related()
|
Triage Stage: |
Unreviewed → Accepted
|
Type: |
Bug → New feature
|
Version: |
1.7 → master
|
Owner: |
changed from nobody to Loek van Gent
|
Status: |
new → assigned
|
Triage Stage: |
Accepted → Ready for checkin
|
Resolution: |
→ fixed
|
Status: |
assigned → closed
|
Marking as a bug since it feels that the API is inconsistent with the rest and its an easy win.