[svn] updated documentation regarding "{% call %}" and documented speedup module. also fixed some minor bugs in the speedup module
--HG--
branch : trunk
diff --git a/tests/runtime/bigtable.py b/tests/runtime/bigtable.py
index a7deaff..a6aae24 100644
--- a/tests/runtime/bigtable.py
+++ b/tests/runtime/bigtable.py
@@ -27,6 +27,12 @@
except ImportError:
have_django = False
+try:
+ from kid import Template as KidTemplate
+ have_kid = True
+except ImportError:
+ have_kid = False
+
from Cheetah.Template import Template as CheetahTemplate
try:
@@ -46,11 +52,20 @@
</table>
""")
+if have_kid:
+ kid_tmpl = KidTemplate("""
+<table xmlns:py="http://purl.org/kid/ns#">
+<tr py:for="row in table">
+<td py:for="c in row.values()" py:content="c"/>
+</tr>
+</table>
+""")
+
if have_django:
django_tmpl = DjangoTemplate("""
<table>
{% for row in table %}
-<tr>{% for col in row.values %}{{ col }}{% endfor %}</tr>
+<tr>{% for col in row.values %}<td>{{ col }}</td>{% endfor %}</tr>
{% endfor %}
</table>
""")
@@ -58,7 +73,7 @@
jinja_tmpl = Environment().from_string('''
<table>
{% for row in table -%}
-<tr>{% for col in row.values() %}{{ col }}{% endfor %}</tr>
+<tr>{% for col in row.values() %}<td>{{ col }}</td>{% endfor %}</tr>
{% endfor %}
</table>
''')
@@ -68,7 +83,7 @@
#for $row in $table
<tr>
#for $col in $row.values()
-$col
+<td>$col</td>
#end for
</tr>
#end for
@@ -81,7 +96,7 @@
% for row in table:
<tr>
% for col in row.values():
- ${col}
+ <td>${col}</td>
% endfor
</tr>
% endfor
@@ -104,6 +119,13 @@
stream = genshi_tmpl.generate(table=table)
stream.render('html', strip_whitespace=False)
+def test_kid():
+ """Kid Templates"""
+ if not have_kid:
+ return
+ kid_tmpl.table = table
+ kid_tmpl.serialize(output="html")
+
def test_cheetah():
"""Cheetah Templates"""
cheetah_tmpl.respond()
@@ -116,7 +138,8 @@
def run(which=None, number=10):
- tests = ['test_django', 'test_jinja', 'test_genshi', 'test_cheetah', 'test_mako']
+ tests = ['test_django', 'test_jinja', 'test_kid', 'test_genshi',
+ 'test_cheetah', 'test_mako']
if which:
tests = filter(lambda n: n[5:] in which, tests)