update all models at once in django,Model.objects.all().order_by('some_field').update(position=F(some_field) + 1)