Skip to content

Commit

Permalink
Provide econtext to the zope traverser instead of just request.
Browse files Browse the repository at this point in the history
  • Loading branch information
malthe committed Jan 6, 2012
1 parent 228d0b7 commit 1ca2fe1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Changelog
=========

In next release ...

- The ``ZopeTraverser`` class now gets ``econtext`` instead of the
name ``request``.

2.1.5 (2011-11-24)
~~~~~~~~~~~~~~~~~~

Expand Down
5 changes: 3 additions & 2 deletions src/z3c/pt/expressions.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,11 @@ class ZopeTraverser(object):
def __init__(self, proxify=identity):
self.proxify = proxify

def __call__(self, base, request, call, *path_items):
def __call__(self, base, econtext, call, *path_items):
"""See ``zope.app.pagetemplate.engine``."""

if bool(path_items):
request = econtext.get('request')
path_items = list(path_items)
path_items.reverse()

Expand Down Expand Up @@ -165,7 +166,7 @@ def replace(match):
components = ()

call = template(
"traverse(base, request, call)",
"traverse(base, econtext, call)",
traverse=self.traverser,
base=load(base),
call=load(str(not nocall)),
Expand Down

0 comments on commit 1ca2fe1

Please sign in to comment.