Open chhetripradeep opened 5 years ago
This is not yet supported.
@flosch Is it possible to set
the array to a variable first and use it. I got the idea from here: https://github.com/flosch/pongo2/blob/2533a7767364043df2d81686fe06e019234556b1/template_tests/set.tpl#L8
{% set new_var = ["hello", "val2"] %}
{% for item in new_var %}
...
{% endfor %}
However, this also seem to give the same error as reported here:
Expected either a number, string, keyword or identifier.
I can verify that problem. In my code I get an error and if I run a test on this repository everything works fine. Is there a problem with the test?
I am trying to use pongo2 on this jinja2 template
but it fails pointing at
[
characterExpected either a number, string, keyword or identifier.
Thank you for your help.