Django

Code

Ticket #3476 (closed: duplicate)

Opened 1 year ago

Last modified 1 year ago

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

Reported by: Henrik Vendelbo <info@fashoncontent.com> Assigned to: adrian
Milestone: Component: Database wrapper
Version: SVN Keywords: order_by ForeignKey
Cc: Triage Stage: Unreviewed
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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

Change History

02/11/07 12:58:22 changed by Michael Radziej <mir@noris.de>

  • status changed from new to closed.
  • needs_better_patch changed.
  • resolution set to duplicate.
  • needs_tests changed.
  • needs_docs changed.

duplicate of #2076


Add/Change #3476 (QuerySet UserProfile.objects.all().order_by('user.last_name'))




Change Properties
Action