Hi,
if you don't specifically ask for the query results to be sorted, their order will be undefined. Differences in your Django version or the RDBMS version or the OS or the environment or anything may result in a different sort order. If you want the query to be sorted, you must either use the ordering meta option or the order_by method.
Regards,
Antonis
Antonis Christofides http://djangodeployment.com
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/777067c4-7a66-416d-8c5f-576566d6b4c1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi,
Unless you have applied ordering, either in model Meta, or in your query clause, results are really "in no particular order". Most of the databases do return results in order the data is read from the disk, but that's not quaranteed.
If you require ordering, add .order_by() to your query to
guarantee wanted sorting.