14
I Use This!
Activity Not Available

News

Analyzed about 2 months ago. based on code collected 3 months ago.
Posted over 17 years ago
It turns out Django MPTT 0.2 had a dodgy setup.py, which only worked if you had a valid DJANGO_SETTINGS_MODULE environment variable in place. You can now grab version 0.2.1 instead, which puts in a quick fix to rectify this.
Posted over 17 years ago
The second public release of Django MPTT is now available for download. Backwards-incompatible changes: mptt.register replaces mptt.models.treeify for registering models with the mptt application. move_node is now the only "public" method ... [More] for moving nodes in TreeManager - it will figure out what do do based on its arguments. Other, peviously public, methods have been renamed with a preceding underscore to indicate the internal nature of their intended use. New and improved features: New model instance methods: insert_at(target, position, commit) is_child_node() is_root_node() is_leaf_node() get_children() get_next_sibling() get_previous_sibling() get_root() New TreeManager methods: insert_node(node, target, position) - insert a new node at any position in the tree, no need to save and then move any more. root_node(tree_id) root_nodes() Tree options are now held in the Options (a.k.a. _meta) for each registered model. Added an order_insertion_by option when registering a model. If a field name is provided, new nodes will automatically be inserted so they're ordered based on the given field at each level in the tree. This ordering is also maintained when automatic reparenting is performed (i.e. when you change a node's parent, then save it). Nodes can now be moved to be siblings of root nodes - this is a special case due to Django MPTT's use of a tree id field, and used to be an invalid move. TreeManager.move_node now performs transaction management in the same manner as model save() and delete() methods. Added a drilldown_tree_for_node template tag. Added a tree_path template filter. The tree_info template filter now accepts an optional argument which can be used to specify that ancestor information be made available for each node in the tree. Added a custom newforms Form, MoveNodeForm, which takes care of moving a given node to any of a given selection of valid target nodes in the tree. Browse the version 0.2 HTML documentation online for more details. [Less]
Posted over 17 years ago
The first public release of Django MPTT is available for download. Version 0.1 features: Simple registration of Model classes for MPTT. The tree structure is automatically managed when you create or delete MPTT Model instances. MPTT Model ... [More] instances gain tree-related methods. Automatic reparenting when an item's parent is changed - allows for basic tree management using the django.contrib.admin application. Custom TreeManager provides a tree node movement API. A template tag and template filter for working with trees of MPTT Model instances. [Less]
Posted over 17 years ago
Django MPTT is an application I've split out from a project I'm working on - it consists of some utilities for implementing Modified Preorder Tree Traversal (MPTT) with your own Django Model classes and helpers for working with trees of Model instances.