order = [x for x in zip(range(len(order)), order,
    original_order) if x[1] != x[2]]
for i in order:
    model.objects.filter(id=i[1]).update(order=i[0])
Django: Update order attribute for objects in a queryset