Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#30253 closed Cleanup/optimization (fixed)

Document how to order nulls in QuerySet.order_by()

Reported by: Paul Wayper Owned by: nobody
Component: Documentation Version: 2.1
Severity: Normal Keywords: documentation
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

While the nulls_first and nulls_last are documented in the F expression documentation, this is not included in the documentation on the order_by queryset method. It would be useful to include a note, and possibly and example, in the order_by method to make it easier to find.

Change History (4)

comment:1 by Paul Wayper, 6 years ago

I've created this branch for a first draft of the documentation change:

https://github.com/django/django/pull/11083

Let me know what you think!

comment:2 by Tim Graham, 6 years ago

Has patch: set
Summary: Add a note that `nulls_first` or `nulls_last` can be set in `order_by` using an F expression.Document how to order nulls in QuerySet.order_by()
Triage Stage: UnreviewedReady for checkin
Type: New featureCleanup/optimization

comment:3 by Tim Graham <timograham@…>, 6 years ago

Resolution: fixed
Status: newclosed

In a48c018:

[2.2.x] Fixed #30253 -- Doc'd how to order nulls in QuerySet.order_by().

Backport of 1025e764291167f2f34a4d55bd3d043836e74250 from master.

comment:4 by Tim Graham <timograham@…>, 6 years ago

In 1025e764:

Fixed #30253 -- Doc'd how to order nulls in QuerySet.order_by().

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