Tuesday, September 5, 2017

Re: Result of queryset in Django 1.10 is not sorted

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    
On 2017-09-05 09:10, Priyanka Thakur wrote:
Hi,

As part of migration to Django 1.10.4 from 1.7, I have noticed that queryset results are unsorted, compared to previous version. 

Has same behaviour been observed by anyone?

Regards,
Priyanka
--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@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.

No comments:

Post a Comment