=====================
Django MPTT CHANGELOG
=====================

.. contents::

Version 0.1
===========

Packaged from revision 37 in Subversion.

Fri 4th Jan, 2008
-----------------

* Added a ``tree_info`` template filter and a ``full_tree_for_model``
  template tag.

Thu 3rd Jan, 2008
-----------------

* Updated documentation with latest changes, a high level overview of
  features and more details about node movement. Moved detailed
  information about MPTT setup internals to the end of the document.

* Reworked exceptions - ``InvalidMove`` is now raised when an invalid
  move is attempted.

* Added a ``move_to`` convenience method to ``Model`` instances.

* Implemented the ``position`` argument for ``make_child_node`` and
  ``move_node`` in ``TreeManager``. The node movement API can now be
  used to move any node to an arbitrary point in any tree.

* Implemented the ``position`` argument for
  ``TreeManager.move_to_new_tree``.

* Implemented a ``position`` argument for
  ``TreeManager.move_within_tree``. The node being moved can now be made
  a sibling, first child or last child of the target node.

* Added a ``move_node`` method to ``TreeManager``, to take care of
  automatically calling the appropriate node movement manager method.

* Combined a number of SQL queries into single queries using ``CASE``
  operators to reduce the overall number of queries required to move
  tree nodes around.

Wed 2nd Jan, 2008
-----------------

* Fixed a bug in ``TreeManager.move_within_tree`` when no level change
  is required.

* Fixed a bug in ``TreeManager.move_within_tree`` - it now takes into
  account whether or not the new parent's right value is greater than
  that of the node which is being moved.

* Added tests for manually moving nodes using the ``TreeManager``
  methods.

* Extracted logic for moving a ``Model`` instance to a different parent
  within its current tree from ``mptt.signals.pre_save`` into the
  ``move_within_tree`` method in ``TreeManager``.

* Extracted logic for moving a ``Model`` instance from one tree to
  another from ``mptt.signals.pre_save`` into the ``move_to_new_tree``
  method in ``TreeManager``.

* Extracted some similar move-node-to-tree queries in ``TreeManager``'s
  ``make_child_node`` and ``make_root_node`` methods out into a new
  ``_inter_tree_move`` method.

Tue 1st Jan, 2008
-----------------

* Extracted logic for turning a ``Model`` instance which is the root
  node of a tree into a child of a given parent node in another tree from
  ``mptt.signals.pre_save`` into the ``make_child_node`` method in
  ``TreeManager``.

* Extracted logic for turning a ``Model`` instance which is a child node
  into the root node of a new tree from ``mptt.signals.pre_save`` into
  the ``make_root_node`` method in ``TreeManager``.

* Removed ``mptt.signals._get_next_tree_id``; added a
  ``get_next_tree_id`` method to ``TreeManager`` to replace it.

* Extracted some similar space-management queries out into the
  ``close_gap`` and ``create_space`` methods in ``TreeManager``.

* Implemented reparenting when a child node is assigned a different
  parent in the same tree.

* Implemented reparenting when a child node is assigned a parent in a
  different tree.

Mon 31st Dec, 2007
------------------

* Implemented reparenting when a root node is transformed into a child
  node by being assigned a parent.

Sun 30th Dec, 2007
------------------

* Implemented reparenting when a ``Model`` instance is transformed into
  a root node by having its parent removed.

* Added tests for creation, ``Model`` instance methods and deletion.

* Added a ``get_siblings`` method to ``Model`` instances.
