본문 바로가기

web/Django

django template if equal


 If it does not work if the door is an integer

flowing change code:


{% if  codeInt1|add:0 == codeInt2|add:0 %}


The default settings is a string. so This conversion is necessary to int.