def move(self, node, destination, position=None, save=False):
        """ Moves the given :class:`CTENode` `node` and places it as a child
            node of the `destination` :class:`CTENode` (or makes it a root node
            if `destination` is ``None``).

            Optionally, `position` can be a callable which is invoked prior to
            placement of the `node` with the `node` and the `destination` node
            as the sole two arguments; this can be useful in implementing
            specific sibling ordering semantics.

            Optionally, if `save` is ``True``, after the move operation
            completes (after the :attr:`CTENode.parent` foreign key is updated
            and the `position` callable is called if present), a call to
            :meth:`Model.save` is made.

            :param destination: the destination node of this move, ``None``
                denoting that the node will become a root node.

            :param position: optional callable invoked prior to placement for
                purposes of custom sibling ordering semantics.

            :param save: optional flag indicating whether this model's
                :meth:`save` method should be invoked after the move.

            :return: this node.
        """
        # Allow custom positioning semantics to specify the position before
        # setting the parent.
        if position is not None:
            position(node, destination)
        node.parent = destination
        if save:
            node.save()
        return node
def move ( self , node , destination , position = None , save = False ) : if position is not None : position ( node , destination ) node . parent = destination if save : node . save ( ) return node
Moves the given :class:`CTENode` `node` and places it as a child
            node of the `destination` :class:`CTENode` (or makes it a root node
            if `destination` is ``None``).

            Optionally, `position` can be a callable which is invoked prior to
            placement of the `node` with the `node` and the `destination` node
            as the sole two arguments; this can be useful in implementing
            specific sibling ordering semantics.

            Optionally, if `save` is ``True``, after the move operation
            completes (after the :attr:`CTENode.parent` foreign key is updated
            and the `position` callable is called if present), a call to
            :meth:`Model.save` is made.

            :param destination: the destination node of this move, ``None``
                denoting that the node will become a root node.

            :param position: optional callable invoked prior to placement for
                purposes of custom sibling ordering semantics.

            :param save: optional flag indicating whether this model's
                :meth:`save` method should be invoked after the move.

            :return: this node.