Form components for working with trees.
A ModelChoiceField for tree nodes.
A ModelMultipleChoiceField for tree nodes.
A ChoiceField for specifying position relative to another node.
A form which allows the user to move a given node from one location in its tree to another, with optional restriction of the nodes which are valid target nodes for the move.
Attempts to move the node using the selected target and position.
If an invalid move is attempted, the related error message will be added to the form’s non-field errors and the error will be re-raised. Callers should attempt to catch InvalidNode to redisplay the form with the error, should it occur.