i = [ 1, 5,2,6] Model.objects.filter(id__in = i) This currently will order them by id, even if i call order_by() with no parameters. The docs say "If you don't want any ordering to be applied to a query, not even the default ordering, call order_by() with no parameters."
Is there a way to maintain the order I have in the list? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---