Re: [Django] #7098: FieldError Invalid order_by arguments in Admin pages when sorting on a ForeignKey

8 views
Skip to first unread message

Django

unread,
Apr 6, 2020, 4:47:53 AM4/6/20
to django-...@googlegroups.com
#7098: FieldError Invalid order_by arguments in Admin pages when sorting on a
ForeignKey
-------------------------------+--------------------------------------
Reporter: trbs | Owner: nobody
Type: | Status: closed
Component: contrib.admin | Version: master
Severity: | Resolution: fixed
Keywords: order_by | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

* ui_ux: => 0
* easy: => 0


Comment:

In [changeset:"98ea4f0f4696221f00e111f1d623452002192e6c" 98ea4f0f]:
{{{
#!CommitTicketReference repository=""
revision="98ea4f0f4696221f00e111f1d623452002192e6c"
Refs #7098 -- Deprecated passing raw column aliases to order_by().

Now that order_by() has expression support passing RawSQL() can achieve
the same result.

This was also already supported through QuerySet.extra(order_by) for
years but this API is more or less deprecated at this point.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/7098#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jan 14, 2021, 2:12:17 PM1/14/21
to django-...@googlegroups.com
#7098: FieldError Invalid order_by arguments in Admin pages when sorting on a
ForeignKey
-------------------------------+--------------------------------------
Reporter: trbs | Owner: nobody
Type: | Status: closed
Component: contrib.admin | Version: master
Severity: | Resolution: fixed
Keywords: order_by | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"06eec3197009b88e3a633128bbcbd76eea0b46ff" 06eec31]:
{{{
#!CommitTicketReference repository=""
revision="06eec3197009b88e3a633128bbcbd76eea0b46ff"
Refs #7098 -- Removed support for passing raw column aliases to
order_by().

Per deprecation timeline.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/7098#comment:5>

Reply all
Reply to author
Forward
0 new messages