#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 , 7 years ago
comment:2 by , 7 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: | Unreviewed → Ready for checkin |
| Type: | New feature → Cleanup/optimization |
Note:
See TracTickets
for help on using tickets.
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!