Ticket #1 (closed defect: fixed)
Include statement raises error
| Reported by: | beewee | Owned by: | mitsuhiko |
|---|---|---|---|
| Priority: | blocker | Milestone: | Jinja 1.2 |
| Component: | parser | Version: | dev |
| Keywords: | Cc: |
Description
The include statement raises this error
Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/pocoo/application.py", line 314, in __call__
return resp(environ, start_response)
File "/usr/lib/python2.5/site-packages/pocoo/http.py", line 197, in __call__
self.response = render_template(req, self.templatename, self.context)
File "/usr/lib/python2.5/site-packages/pocoo/template.py", line 200, in render_template
template = ctx.template_env.get_template('%s::%s' % (template_name, name))
File "/usr/lib/python2.5/site-packages/jinja/environment.py", line 222, in get_template
return self._loader.load(filename)
File "jinja://partial/post.html", line 2, in <module>
{% if not post.deleted %}
jinja.exceptions.TemplateSyntaxError: unknown directive 'data'. (post.html, line 2)
if the first element in the included file is an if-statement. If there is some text before the if-statement it works without problems.
Change History
Note: See
TracTickets for help on using
tickets.