I am using janja2 templating language in my GAE-python project. I tried using jquery-upload to upload files.
The following code throws an error:
¬
152 <script id="template-upload" type="text/x-tmpl">¬
-- 153 {% for (var i=0, file; file=o.files[i]; i++) { %}¬
| 154 <tr class="template-upload fade">¬
| 155 <td class="preview"><span class="fade"></span></td>¬
|- 156 <td class="name"><span>{%=file.name%}</span></td>¬
The above code is directly taken from the jquery download library.
Error:
line 153, in template
{% for (var i=0, file; file=o.files[i]; i++) { %}
TemplateSyntaxError: expected token ')', got 'i'
I think it is called due to {% %}which jinja2 is used, as well as the text / x-tmpl js syntax. It's right? If so, how can I get around this? Please, help.
source
share