[Checkins] SVN: z3c.pt/trunk/ Insert intial template context (parameters) into dynamic scope. Many applications expect this (they expect all variable definitions to go in there, but we won't go that far since it's anyway undocumented functionality).
Malthe Borch
mborch at gmail.com
Fri Mar 6 12:40:59 EST 2009
Log message for revision 97595:
Insert intial template context (parameters) into dynamic scope. Many applications expect this (they expect all variable definitions to go in there, but we won't go that far since it's anyway undocumented functionality).
Changed:
U z3c.pt/trunk/CHANGES.txt
U z3c.pt/trunk/src/z3c/pt/pagetemplate.py
-=-
Modified: z3c.pt/trunk/CHANGES.txt
===================================================================
--- z3c.pt/trunk/CHANGES.txt 2009-03-06 17:33:15 UTC (rev 97594)
+++ z3c.pt/trunk/CHANGES.txt 2009-03-06 17:40:58 UTC (rev 97595)
@@ -1,6 +1,11 @@
Changelog
---------
+In next release
+
+- Insert initial variable context into dynamic scope. The presence of
+ these is expected by many application. [malthe]
+
1.0b11 (2009/03/05)
~~~~~~~~~~~~~~~~~~~
Modified: z3c.pt/trunk/src/z3c/pt/pagetemplate.py
===================================================================
--- z3c.pt/trunk/src/z3c/pt/pagetemplate.py 2009-03-06 17:33:15 UTC (rev 97594)
+++ z3c.pt/trunk/src/z3c/pt/pagetemplate.py 2009-03-06 17:40:58 UTC (rev 97595)
@@ -10,6 +10,7 @@
from chameleon.core import codegen
from chameleon.core import clauses
from chameleon.core import generation
+from chameleon.core import utils
from chameleon.zpt import template
from chameleon.zpt.interfaces import IExpressionTranslator
@@ -81,7 +82,6 @@
def bind(self, ob, request=None, macro=None, global_scope=True):
def render(target_language=None, **kwargs):
context = self._pt_get_context(ob, request, kwargs)
-
if target_language is None:
try:
target_language = i18n.negotiate(
@@ -90,6 +90,7 @@
target_language = None
context['target_language'] = target_language
+ context["econtext"] = utils.econtext(context)
if macro is None:
return self.render(**context)
More information about the Checkins
mailing list