NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #3788 most downloaded on PyPI
Efficient tree implementations for Django
Last release 19 days ago
15 Sep 2026
Ships unpredictably
gaps range from 8 days to 1.8 years
Nearly every release is documented
notes for 37 of 41 stable releases
1 version withdrawn
withdrawn after publishing
17 years old
47 releases · first in 2009
Treebeard 7.0.2 is a bugfix release.
Treebeard 7.0.2 is a bugfix release.
Nothing published for this version
Treebeard's Django admin integration (AdminTree) has been rewritten. The new implementation is significantly more performant and scalable, and impleme
AdminTree) has been rewritten. The new implementation is
significantly more performant and scalable, and implements lazy-loading for node children.
Projects that had overridden TreeAdmin behaviour should consult the code for changes.max_depth argument to the get_tree() and get_descendants() methods,
to allow control over the depth of the tree that is returned.get_descendant_count() to use a database count instead
of fetching the entire queryset (for MP, NS and LT implementations).One column per quarter.
Nothing published for this version
Treebeard 6.0.0 is a major release. It features a change to Treebeard's API.
Treebeard 6.0.0 is a major release. It features a change to Treebeard's API.
The following methods that previously existing on the Node model class have now moved to the
model manager instead:
load_bulkdump_bulkfind_problemsfix_treeget_treeget_descendants_group_countget_annotated_list_qsget_annotated_listget_root_nodesget_first_root_nodeget_last_root_nodeget_childrenget_children_countget_siblingsget_descendantsget_descendant_countget_first_childget_last_childget_first_siblingget_last_siblingget_prev_siblingget_next_siblingget_rootget_parentget_ancestorsSo, for example, code like this:
node.get_children()
Would need to be rewritten as:
MyModel.objects.get_children(node)
Putting these methods on the model manager instead of the model class is more consistent with Django's design patterns, and provides much more flexibility with their use. It also keeps the model class slim, avoiding conflicts with code layered on top.
Backward compatibility exists for all these methods, which will be removed in Treebeard 8.
It is now mandatory for the default model manager for a Treebeard model to subclass Treebeard's manager. An error will be raised if this is not the case.
Fixed erroneous no-op when moving MP_Node nodes with node_order_by set.
Bugfixes in these releases:
MP_Node nodes with node_order_by set.Treebeard 5.3.0 is a minor release.
Treebeard 5.3.0 is a minor release.
load_bulk(). These were previously
exported when using dump_bulk(), but were not handled when loading the same data.delete() operations on querysets that had a prefetch.Node class does not subclass the corresponding Treebeard model manager. This will raise an error in the next major release of Treebeard.Revert change to MP_Node.get_ancestors() that caused a performance …
Revert change to MP_Node.get_ancestors() that caused a performance …
Treebeard 5.2.2 is a bugfix release.
MP_Node.get_ancestors() (https://github.com/django-treebeard/django-treebeard/issues/403).Fix import error in Python 3.10. Ensure lowest supported Python versi…
Fix import error in Python 3.10. Ensure lowest supported Python versi…
Treebeard 5.2.1 is a bugfix release.
Treebeard 5.1.0 is a minor release that includes some bug fixes.
Treebeard 5.1.0 is a minor release that includes some bug fixes.
New features:
bulk_create option to MP_Node.load_bulk(), that creates database entries in bulk instead of one at a time.MP_Node, NS_Node and LT_Node implementations to allow external data stores to stay in sync with Treebeard-based models.Big fixes:
MP_Node paths being incremented unnecessarily when saving nodes with node_order_by in the admin.MoveNodeForm to skip move logic if no treebeard-specific fields were modified.LTree.path to be deferrable, so that move operations do not fail. This requires a database migration for projects using the experimental LTree implementation.Treebeard 5.1.0 is a bugfix release.
Treebeard 5.1.0 is a bugfix release.
add_child and add_sibling behaviour for inherited models using NS_Node.parent param to MP_Node.find_problems to allow inspecting only a portion of a tree.find_problems method to NS_Node to identify issues with nested sets.Treebeard 5.0.5 is a bugfix release.
Treebeard 5.0.5 is a bugfix release.
Treebeard 5.0.4 is a bugfix release.
Treebeard 5.0.4 is a bugfix release.
TypeError when adding root nodes for MP and LT trees with node_order_by set.Treebeard 5.0.3 is a bugfix release.
Treebeard 5.0.3 is a bugfix release.
add_child() on the same node,
or when concurrently adding root nodes.Treebeard 5.0.2 is a bugfix release.
Treebeard 5.0.2 is a bugfix release.
node_order_by.TreeAdmin.node_order_by more gracefully: ignore the field
for the purpose of ordering and log a warning to indicate that the value likely needs to be
provided manually.dump_bulk() methods to use a queryset iterator to avoid loading large datasets into memory.pyscopg was not installed.Treebeard 5.0.1 is a bugfix release.
Treebeard 5.0.1 is a bugfix release.
The deprecated destructive argument was removed from MP_Node.fix_tree() use fix_paths instead.
Treebeard 5.0 is a major release with a number of significant changes:
Backward incompatible changes:
MoveNodeForm have been renamed from
_position to treebeard_position and _ref_node_id to treebeard_ref_node.MP_AddChildHandler and MP_AddSiblingHandler
to avoid collisions with model field names. Both constructors now expect a mapping of model
creation arguments as a single parameter, instead of keywords arguments passed to the constructor.MoveNodeForm has been refactored to use a ModelChoiceField for selecting the relative node. This field
can be used by projects, e.g., for foreign keys in the Django admin.Node.get_database_vendor() helper function which is no longer used.destructive argument was removed from MP_Node.fix_tree() use fix_paths instead.Other changes:
parent argument to MP_Node.fix_tree to allow fixing only a portion of a tree.Add support for Django 5.2, and Python 3.13.
include_self option to get_descendants method.Nothing published for this version
Fix: Allow usage of CSRF_COOKIE_HTTPONLY setting.
* Drop support for Django 4.0. * Add support for Django 4.2.
Fix unescaped string representation of AL_Node models in the Django admin. Thanks to goodguyandy for reporting the issue.
AL_Node models in the Django admin.
Thanks to goodguyandy for reporting the issue.MP_Node.get_descendants to avoid database queries when called on a leaf node.Nothing published for this version
Removed unnecessary default in MP's depth field.
Add support for custom primary key fields with custom names.
Implement a non-destructive path-fixing algorithm for MP_Node.fix_tree.
MP_Node.fix_tree.post_save is triggered after the parent node is updated in MP_AddChildHandler.static template tag instead of constructing the URL manually.MoveNodeForm when using large trees.Added check to avoid unnecessary database query for MP_Node.get_ancestors() if the node is a root node.
MP_Node.get_ancestors()
if the node is a root node.__init__(self, *args, **kwargs),
e.g. django-parler's TranslatableModelForm, where kwargs.get('instance') is None
when called from here.* Support for Django-2.0
Bugfix issues #90: admin change list view and jsi18n load for Django-1.11
* Support for Django-2.0
Fixed MANIFEST.in for Debian packaging.
Removed deprecated templatetag inclusion
Moved Repository from Bitbucket to GitHub
Escape input in forms (Martin Koistinen / Divio)
Remove deprecated backports needed for now unsupported Django versions
Removed usage of deprecated Django functions.
* Stable release.
Fixed unicode related issue in the template tags.
* Dropped support for Python 2.5
Added support for Django 1.5 and Python 3.X
This is a beta release.
Oregon Center for Applied Science, inspired by FeinCMS developed by
Jesús del Carpio_ with tests from Fernando Gutierrez_. Thanks ORCAS!Added admin i18n. Included translations: es, ru
Complete revamp of the documentation. It's now divided in sections for easier reading, and the package includes .rst files instead of the html build.
Really fixed the installation of templates.
Forgot to include treebeard/tempates/\*.html in MANIFEST.in
Nothing published for this version
New features added ~~~~~~~~~~~~~~~~~~
New features added
* Forms
- Added MoveNodeForm
* Django Admin
- Added TreeAdmin
* MP_Node
- Added 2 new checks in MP_Node.find_problems():
4. a list of ids of nodes with the wrong depth value for
their path
5. a list of ids nodes that report a wrong number of children
- Added a new (safer and faster but less comprehensive) MP_Node.fix_tree()
approach.
* Documentation
- Added warnings in the documentation when subclassing MP_Node or NS_Node
and adding a new Meta.
- HTML documentation is now included in the package.
- CHANGES file and section in the docs.
* Other changes:
- script to build documentation
- updated numconv.py
Bugs fixed
~~~~~~~~~~
* Added table quoting to all the sql queries that bypass the ORM.
Solves bug in postgres when the table isn't created by syncdb.
* Removing unused method NS_Node._find_next_node
* Fixed MP_Node.get_tree to include the given parent when given a leaf node
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →