git.ithinksw.org
/
philo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' into navigation
[philo.git]
/
contrib
/
navigation
/
templatetags
/
navigation.py
diff --git
a/contrib/navigation/templatetags/navigation.py
b/contrib/navigation/templatetags/navigation.py
index
9cd9df5
..
c74891b
100644
(file)
--- a/
contrib/navigation/templatetags/navigation.py
+++ b/
contrib/navigation/templatetags/navigation.py
@@
-7,7
+7,8
@@
register = template.Library()
@register.filter
@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)
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)