[Django] #26310: add to documentation that a Model's default ordering is semi-randomly

6 views
Skip to first unread message

Django

unread,
Mar 3, 2016, 4:00:32 AM3/3/16
to django-...@googlegroups.com
#26310: add to documentation that a Model's default ordering is semi-randomly
-------------------------------+--------------------
Reporter: wimfeijen | Owner: nobody
Type: Uncategorized | Status: new
Component: Documentation | Version: 1.9
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------+--------------------
https://docs.djangoproject.com/en/1.9/ref/models/options/#ordering

Mistakenly, I was thinking that if no ordering was given on a Model's
Meta, ordering is by "-id". I was foolishly mistaken. My proposal is to
add to the documentation:

"If no ordering is given, results are returned from the database as is.
Ordering might be anything, semi-randomly."

--
Ticket URL: <https://code.djangoproject.com/ticket/26310>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Mar 3, 2016, 10:19:57 AM3/3/16
to django-...@googlegroups.com
#26310: Document that a query's default ordering is unspecified
--------------------------------------+------------------------------------
Reporter: wimfeijen | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: 1.9
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by timgraham):

* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
* has_patch: 0 => 1
* type: Uncategorized => Cleanup/optimization
* stage: Unreviewed => Accepted


Comment:

[https://github.com/django/django/pull/6235 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/26310#comment:1>

Django

unread,
Mar 3, 2016, 3:03:47 PM3/3/16
to django-...@googlegroups.com
#26310: Document that a query's default ordering is unspecified
-------------------------------------+-------------------------------------
Reporter: wimfeijen | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Documentation | Version: 1.9
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by charettes):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/26310#comment:2>

Django

unread,
Mar 3, 2016, 6:11:17 PM3/3/16
to django-...@googlegroups.com
#26310: Document that a query's default ordering is unspecified
-------------------------------------+-------------------------------------
Reporter: wimfeijen | Owner: nobody
Type: | Status: closed
Cleanup/optimization |
Component: Documentation | Version: 1.9
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"c0181f2c1f982d27cdcea2ed293aa34a3ecf7d8b" c0181f2c]:
{{{
#!CommitTicketReference repository=""
revision="c0181f2c1f982d27cdcea2ed293aa34a3ecf7d8b"
Fixed #26310 -- Documented that a queryset ordering must be specified to
ensure ordered results.

Thanks Simon Charette for review.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/26310#comment:3>

Reply all
Reply to author
Forward
0 new messages