M. Gar
M. Gar

Reputation: 887

Loop in template without context variables

Is possible to use a loop using just numbers and not context variables in the template something like:

{% for (int i = 22; i < 65; ++i) %}
<input id="name_{{i}}" type="number" value="{{i}}">
{% endfor %}

If is possible to do how can I do it? thanks in advance.

Upvotes: 0

Views: 29

Answers (1)

NotAName
NotAName

Reputation: 4347

You can just use:

for i in range(22,64):

Upvotes: 1

Related Questions