Code

Opened 6 years ago

Closed 6 years ago

#5861 closed (duplicate)

order_by() docs are unclear about relation spanning sort

Reported by: Akatemik Owned by: nobody
Component: Documentation Version: master
Severity: Keywords: db-api
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

The documentation at http://www.djangoproject.com/documentation/db-api/#order-by-fields "To order by a field in a different table, add the other table’s name and a dot". However this will result in error if neither select_related() nor extra(tables=) is used. Especially the example is misleading.

Attachments (0)

Change History (1)

comment:1 Changed 6 years ago by mtredinnick

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

This is the problem reported in #2076 and is now fixed on the queryset-refactor branch. Our practice is not to document bugs, but to fix them. So this will be "fixed" when queryset-refactor is merged into trunk (which will mean an improved cross-model ordering syntax in any case).

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.