My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 5: root_node(tree_id) for manager
1 person starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  jonathan.buchanan
Closed:  Jan 2008


 
Reported by peac...@gmail.com, Jan 9, 2008
Feature request:

Please add a method to retrieve the root node of a particular tree in the
manager

def root_node(tree_id):
  return self.filter(**{
    '%s__isnull' % self.parent_attr: True,
    '%s__exact' % self.tree_id_attr: tree_id})

Thanks.

 
Jan 9, 2008
#1 peac...@gmail.com
Sorry I forgot to change the type, it is not a defect :D
Jan 9, 2008
Project Member #2 jonathan.buchanan
Annoyingly, Google Code won't let you set it for some reason.

It would be handy to add a similar method to model instances as well.
Status: Accepted
Owner: jonathan.buchanan
Labels: -Type-Defect Type-Enhancement
Jan 10, 2008
Project Member #3 jonathan.buchanan
Added a get_root method to model instances in revision 70 and a root_node method to
TreeManager in revision 71.

Thanks!
Status: Fixed
Jan 10, 2008
#4 peac...@gmail.com
Very nice :-) Thank you.

Powered by Google Project Hosting