Changes between Initial Version and Version 1 of Ticket #32170


Ignore:
Timestamp:
Nov 4, 2020, 8:42:17 AM (4 years ago)
Author:
Michael
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #32170 – Description

    initial v1  
    11In a model one can do `.select_related('foo__bar')`.
    22
    3 However in the admin view if one has `select_related = ('foo__bar', )`  it raises the error `Non-relational field given in select_related: 'bar'. Choices are: ...`. One has to do `select_related = ('foo', )`. Hence  to select only certain fields, one has to override the `get_queryset`.
     3However in the admin view if one has `select_related = ('foo__bar', )`  it raises the error `Non-relational field given in select_related: 'bar'. Choices are: ...`. One has to do `list_select_related = ('foo', )`. Hence  to select only certain fields, one has to override the `get_queryset`.
    44
    55Seems a bit inconsistent? I guess it goes hand in hand with not allowing foreign key fields in list display (#5863) etc.
Back to Top