I have mako template where i check conditions from a simple dict in for loop, like:
% for el in seq:
% if el["attr"] == 1:
...
elif:
....
else:
.....
% endif
And if i want add another IF statement in this loop, like:
%if el["attr1"] == 1:
....
%endif
I have error: "SyntaxException: Keyword 'endif' doesn't match keyword 'for' in file" Its possible two or more IF statements in one FOR loop ?
You're missing the %endfor and the % from elif and else statements:
%for el in seq:
%if foo:
pass
%elif bar:
pass
%else:
pass
%endif
%endfor