[Checkins] SVN: z3c.pt/trunk/src/z3c/pt/genshi.txt A new failing test
Wichert Akkerman
wichert at wiggy.net
Mon Aug 18 04:20:56 EDT 2008
Log message for revision 89959:
A new failing test
Changed:
U z3c.pt/trunk/src/z3c/pt/genshi.txt
-=-
Modified: z3c.pt/trunk/src/z3c/pt/genshi.txt
===================================================================
--- z3c.pt/trunk/src/z3c/pt/genshi.txt 2008-08-18 08:05:04 UTC (rev 89958)
+++ z3c.pt/trunk/src/z3c/pt/genshi.txt 2008-08-18 08:20:55 UTC (rev 89959)
@@ -363,6 +363,40 @@
... """)
one two
+:: Strange looping behaviour
+ >>> brands=[dict(id=1, title="One"),
+ ... dict(id=2, title="Two"),
+ ... dict(id=3, title="Three")]
+ >>> print render_genshi("""\
+ ... <div xmlns="http://www.w3.org/1999/xhtml"
+ ... xmlns:py="http://genshi.edgewall.org">
+ ... <script type="text/javascript">
+ ... var brands = [
+ ... <py:for each="brand in brands">
+ ... { value : "${brand['id']}", "title" : "${brand['title']}" },
+ ... </py:for>
+ ... ];
+ ...
+ ... $(document.ready(function() {
+ ... alert("Hello, World");
+ ... });
+ ... </script>
+ ... </div>""", brands=brands)
+ <div>
+ <script type="text/javascript">
+ var brands = [
+ { value : "1", "title" : "One" },
+ { value : "2", "title" : "Two" },
+ { value : "3", "title" : "Three" },
+ ];
+ <BLANKLINE>
+ $(document.read(function() {
+ alert("Hello, World");
+ });
+ </script>
+ </div>
+
+
.. _py:with specs: http://genshi.edgewall.org/wiki/Documentation/0.4.x/xml-templates.html#py-with
More information about the Checkins
mailing list