google-code-export / django-mptt

Automatically exported from code.google.com/p/django-mptt
Other
0 stars 0 forks source link

get_next_sibling() and get_previous_sibling() should have support for filters #57

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Useful in cases when there is requirement for some specific sibling. @see patch 
- it is a backward 
compatible change.

Original issue reported on code.google.com by pcicman@gmail.com on 22 Jul 2009 at 10:27

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for the patch. 

However, next_sibling and previous_sibling are already specific siblings. 
Adding filters to those methods doesn't make sense to me.

If you want a different sibling, you can do 

    node.get_siblings().get(**filters)

Original comment by craig.ds@gmail.com on 3 Sep 2010 at 10:41