I'm trying to add some values from another list synchronously in the for loop of django ’s template. When I use a given number everything works fine, but when I replace it to `{{forloop.counter}}` it reports an error `slice requires 2 arguments, 1 provided`
I Googled it and the suggestion is that there should be no spaces in the code, but there are no spaces in my code, here the code in question.

```
{% for i in invtypes %}
                    <li>
                        ...
                        <p>{{data|slice:":{{forloop.counter}}"}}</p>
                    </li>
{% endfor %}

```

The `{{data}}` is a list of extra data for `invtypes` so they have same length and sort。