Code

Opened 7 years ago

Closed 7 years ago

#3476 closed (duplicate)

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

Reported by: Henrik Vendelbo <info@…> Owned by: adrian
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.

Attachments (0)

Change History (1)

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

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to duplicate
  • Status changed from new to closed

duplicate of #2076

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.