Commit 005b17f1 authored by Evan Simpson's avatar Evan Simpson

Collector #616: Make CONTEXTS available to TALES Python expressions.

parent 2133b2e8
...@@ -33,6 +33,8 @@ Zope Changes ...@@ -33,6 +33,8 @@ Zope Changes
(such as storages, databases, or logging handlers) to be used. (such as storages, databases, or logging handlers) to be used.
Bugs fixed Bugs fixed
- Collector #616: Make CONTEXTS available to TALES Python expressions.
- Collector #1074: Give Script execution context a __name__ - Collector #1074: Give Script execution context a __name__
- Collector #1095: Allow TAL paths starting with '/varname' as a - Collector #1095: Allow TAL paths starting with '/varname' as a
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
"""Generic Python Expression Handler """Generic Python Expression Handler
""" """
__version__='$Revision: 1.11 $'[11:-2] __version__='$Revision: 1.12 $'[11:-2]
from TALES import CompilerError from TALES import CompilerError
from sys import exc_info from sys import exc_info
...@@ -45,7 +45,7 @@ class PythonExpr: ...@@ -45,7 +45,7 @@ class PythonExpr:
def _bind_used_names(self, econtext, _marker=[]): def _bind_used_names(self, econtext, _marker=[]):
# Bind template variables # Bind template variables
names = {} names = {'CONTEXTS': econtext.contexts}
vars = econtext.vars vars = econtext.vars
getType = econtext.getCompiler().getTypes().get getType = econtext.getCompiler().getTypes().get
for vname in self._f_varnames: for vname in self._f_varnames:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment