<a href="#"><i class="{{if ans=='A': }} {{if ans==correctans: 
response.write('icon-ok') else:  response.write('icon-remove') pass }} {{ 
pass }}"></i></a>

I get a syntax error for the above code in view html file. I am trying to 
dynamically insert a tick icon or a cross icon depending on some variables. 
I tried different ways of expressing the if statements and none of them 
worked. I followed the book that says we should introduce a pass statement 
for every block (sometimes the block is obvious and in that case we don't 
need a pass statement).

Please help catch the cause for syntax error.. Thank you 

-- 



Reply via email to