I am using Ubuntu 12.04, python 3.2.3 and jinja2 2.6-1.
When passing the option lstrip_blocks to the Environment as follows, I get this error
"**TypeError: \__init__() got an unexpected keyword argument 'lstrip_blocks'**"
from jinja2 import Environment, PackageLoader
env = Environment(loader=PackageLoader('jinja2_hello','.'),lstrip_blocks=True)
template = env.get_template('template_hello.html')
output = template.render()
print(output)
The template template_hello.html
contains only:
hello
The other option 'trim_blocks`, alone, works perfectly.
Would you have any suggestions to solve this. I haven't been able to fix it. Thanks
The lstrip_blocks
option was only added in Jinja 2.7.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With