[Checkins] SVN: z3c.pt/trunk/z3c/pt/ Ugh. Well,
this won't happen anyway.
Malthe Borch
mborch at gmail.com
Mon Dec 3 13:02:49 EST 2007
Log message for revision 82103:
Ugh. Well, this won't happen anyway.
Changed:
U z3c.pt/trunk/z3c/pt/pagetemplate.py
U z3c.pt/trunk/z3c/pt/tal.py
-=-
Modified: z3c.pt/trunk/z3c/pt/pagetemplate.py
===================================================================
--- z3c.pt/trunk/z3c/pt/pagetemplate.py 2007-12-03 17:35:50 UTC (rev 82102)
+++ z3c.pt/trunk/z3c/pt/pagetemplate.py 2007-12-03 18:02:48 UTC (rev 82103)
@@ -29,17 +29,21 @@
# imports and symbols
stream.write("from cgi import escape as _escape")
stream.write("from z3c.pt.tal import repeatdict as _repeatdict")
+ stream.write("from z3c.pt.tal import attrdict as _attrdict")
stream.write("from StringIO import StringIO as _StringIO")
-
+
stream.write("def render(**_kwargs):")
stream.indent()
# globalize imports and set up process variables
- stream.write("global _StringIO, _repeatdict, _escape")
+ stream.write("global _StringIO, _repeatdict, _attrdict, _escape")
stream.write("repeat = _repeatdict()")
stream.write("_attrs = {}")
stream.write("_scope = _kwargs.keys()")
-
+
+ # proxy kwargs as attrdict
+ stream.write("_kwargs = _attrdict(**_kwargs)")
+
# output
stream.write("_out = _StringIO()")
Modified: z3c.pt/trunk/z3c/pt/tal.py
===================================================================
--- z3c.pt/trunk/z3c/pt/tal.py 2007-12-03 17:35:50 UTC (rev 82102)
+++ z3c.pt/trunk/z3c/pt/tal.py 2007-12-03 18:02:48 UTC (rev 82103)
@@ -179,9 +179,6 @@
self.defines = [(v, Assign(e)) for v, e in definition(value)]
self.variables = list(itertools.chain(*[v for (v, e) in self.defines]))
- if '' in self.variables:
- import pdb; pdb.set_trace()
-
def update(self, node):
return node
More information about the Checkins
mailing list