Opened 10 years ago

Closed 10 years ago

#3476 closed (duplicate)

QuerySet UserProfile.objects.all().order_by('user.last_name')

Reported by: Henrik Vendelbo <info@…> Owned by: Adrian Holovaty
Component: Database layer (models, ORM) Version: master
Severity: Keywords: order_by ForeignKey
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

This expression isn't supported in fact, I can't seem to find a way to order by fields through a ForeignKey field. The documentation hints at a way to do it, but is not apparent how to write the expression.

Change History (1)

comment:1 Changed 10 years ago by Michael Radziej <mir@…>

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Resolution: duplicate
Status: newclosed

duplicate of #2076

Note: See TracTickets for help on using tickets.
Back to Top