diff options
author | Armin Ronacher <armin.ronacher@active-4.com> | 2008-09-20 12:04:53 +0200 |
---|---|---|
committer | Armin Ronacher <armin.ronacher@active-4.com> | 2008-09-20 12:04:53 +0200 |
commit | c347ed0f456ffab654a3621f59b1daeda724977f (patch) | |
tree | ace1e1693775017f2d8b66d1f362f4bff95488f0 /examples/bench.py | |
parent | 1b54f7435ba58add1e4ac495688c39ff36fb59eb (diff) | |
download | jinja2-c347ed0f456ffab654a3621f59b1daeda724977f.tar.gz |
Unified some code in the super/template reference system.
--HG--
branch : trunk
Diffstat (limited to 'examples/bench.py')
-rw-r--r-- | examples/bench.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/examples/bench.py b/examples/bench.py index 8696be0..49b1c75 100644 --- a/examples/bench.py +++ b/examples/bench.py @@ -61,7 +61,7 @@ try: except ImportError: test_django = None else: - django_template = DjangoTemplate("""\ + django_template = """\ <!doctype html> <html> <head> @@ -89,13 +89,16 @@ else: </div> </body> </html>\ -""") +""" def test_django(): c = DjangoContext(context) c['navigation'] = [('index.html', 'Index'), ('downloads.html', 'Downloads'), ('products.html', 'Products')] - django_template.render(c) + # recompile template each rendering because that's what django + # is doing in normal situations too. Django is not thread safe + # so we can't cache it in regular apps either. + DjangoTemplate(django_template).render(c) try: from mako.template import Template as MakoTemplate |