code: def _save(self, objects, old_pos, new_pos):
          
          to_shift = objects.exclude(pk=self.pk) if self.pk else objects
  
          # If not set, insert at end.
          if self.sort_order is None:
              self._move_to_end(objects)
  
          # New insert.
          elif not self.pk and not old_pos:
              # Increment `sort_order` on objects with:
              #     sort_order > new_pos.
              to_shift = to_shift.filter(sort_order__gte=self.sort_order)
              self._update(to_shift)
              self.sort_order = new_pos
  
          # self.sort_order decreased.
          elif old_pos and new_pos < old_pos:
              self._move_to_end(objects)
              super(Orderable, self).save()
              # Increment `sort_order` on objects with:
              #     sort_order >= new_pos and sort_order < old_pos
              to_shift = to_shift.filter(sort_order__gte=new_pos, sort_order__lt=old_pos)
              self._update(to_shift)
              self.sort_order = new_pos
  
          # self.sort_order increased.
          elif old_pos and new_pos > old_pos:
              self._move_to_end(objects)
              super(Orderable, self).save()
              # Decrement sort_order on objects with:
              #     sort_order <= new_pos and sort_order > old_pos.
              to_shift = to_shift.filter(sort_order__lte=new_pos, sort_order__gt=old_pos)
              to_shift.update(sort_order=models.F('sort_order') - 1)
              self.sort_order = new_pos
docs: WARNING: Intensive giggery-pokery zone.