Hi
I have used some templates in older django versions.
But now in django 1.11 using the same templates, the error:
ValueError: Need 2 values to unpack in for loop; got 3.
will be raised on line 207 in module django.template.defaulttags
by the method render of class ForNode
Actually is by me looking at code num_loopvars = 2 and len_item = 3.
After I've outcommented this part of code, some of this template as a form is displayed and one can work on it.
So could somebody tell me what is purpose of this two variables and comparing of them?
Thanks very much in advance and best regards
Ogi
Michal, Thanks very much for your reply.
I guessed, that is something like in your example.
And I find it in template.
So the conclusion is that there is no more allowed in django
template engine to use for loop with less elements to
unpack,
and I think that is also consistent and more pythonic.
Best regards
Ogi