Opened 18 years ago
Closed 18 years ago
#3476 closed (duplicate)
QuerySet UserProfile.objects.all().order_by('user.last_name')
Reported by: | 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 |
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.
Note:
See TracTickets
for help on using tickets.
duplicate of #2076