Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: pws21/django-sitetree
base: c00f175
...
head fork: pws21/django-sitetree
compare: 6a4643e
  • 1 commit
  • 2 files changed
  • 0 commit comments
  • 1 contributor
Showing with 8 additions and 8 deletions.
  1. +2 −2 sitetree/sitetreeapp.py
  2. +6 −6 sitetree/templatetags/sitetree.py
View
4 sitetree/sitetreeapp.py
@@ -487,8 +487,8 @@ def children(self, parent_item, navigation_type, use_template, context):
tree_items = self.mark_visible_children(tree_alias, tree_items, navigation_type)
tree_items = self.apply_hook(tree_items, '%s.children' % navigation_type)
my_template = template.loader.get_template(use_template)
- my_context = template.Context({'sitetree_items': tree_items, 'user': context['user']})
- return my_template.render(my_context)
+ context.update({'sitetree_items': tree_items})
+ return my_template.render(context)
def get_children(self, tree_alias, item):
tree_alias = self.resolve_tree_i18_alias(tree_alias)
View
12 sitetree/templatetags/sitetree.py
@@ -175,8 +175,8 @@ def __init__(self, tree_alias, use_template):
def render(self, context):
tree_items = sitetree.tree(self.tree_alias, context)
- my_context = template.Context({'sitetree_items': tree_items, 'user': context['user']})
- return self.template.render(my_context)
+ context.update({'sitetree_items': tree_items})
+ return self.template.render(context)
class sitetree_childrenNode(template.Node):
@@ -202,8 +202,8 @@ def __init__(self, tree_alias, use_template):
def render(self, context):
tree_items = sitetree.breadcrumbs(self.tree_alias, context)
- my_context = template.Context({'sitetree_items': tree_items, 'user': context['user']})
- return self.template.render(my_context)
+ context = template.Context({'sitetree_items': tree_items})
+ return self.template.render(context)
class sitetree_menuNode(template.Node):
@@ -218,8 +218,8 @@ def __init__(self, tree_alias, tree_branches, use_template):
def render(self, context):
tree_items = sitetree.menu(self.tree_alias, self.tree_branches, context)
- my_context = template.Context({'sitetree_items': tree_items, 'user': context['user'], 'request': context['request']})
- return self.template.render(my_context)
+ context.update({'sitetree_items': tree_items})
+ return self.template.render(context)
class sitetree_urlNode(template.Node):

No commit comments for this range

Something went wrong with that request. Please try again.