You are writing a comment about Replacing Django's Template Language With Jinja2, here is a quick summary:
The first example in the Loosely Coupled Django series, this entry looks at replacing Django's template language with the freshly released Jinja2 template language.
You are responding to this comment written by Terry Jones on February 6th 2009, 19:01.
Hi Will
Thanks for taking the time to write all this up.
In your render_to_response function you have a default argument: context={}
This is almost certainly not want you want (though I guess it works in this situation if the context dict always has the same keys).
The function default is evaluated ONCE, when the function def is read. So you want context=None and then a test to see if it's None and set it to {} if so. Make sense?
Thanks again, Terry
Please be aware that comment forms go stale after one hour.
Comments may make use of LifeFlow MarkDown. Raw html will be escaped.
Quick Introduction to LifeFlow MarkDown Syntax
A highlighted code block:
Other common languages work as well: scheme, python, java, html, etc.
Other markdown syntax: