Opened 17 years ago

Closed 17 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: dev
Severity: Keywords: order_by ForeignKey
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


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 by Michael Radziej <mir@…>, 17 years ago

Resolution: duplicate
Status: newclosed

duplicate of #2076

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