X-Git-Url: http://git.ithinksw.org/philo.git/blobdiff_plain/87443c44a6efa3010e31dbd50347efab8170d6f6..0adc7822400fb7fa49bc15a13e3e74e997184e80:/contrib/navigation/templatetags/navigation.py diff --git a/contrib/navigation/templatetags/navigation.py b/contrib/navigation/templatetags/navigation.py index 9cd9df5..c74891b 100644 --- a/contrib/navigation/templatetags/navigation.py +++ b/contrib/navigation/templatetags/navigation.py @@ -7,7 +7,8 @@ register = template.Library() @register.filter -def get_descendants(roots): +def get_navigation(node): + roots = Navigation.objects.for_node(node) qs = None for root in roots: root_qs = root.get_descendants(include_self=True).complex_filter({'%s__lte' % root._mptt_meta.level_attr: root.get_level() + root.depth}).exclude(depth__isnull=True)