python

[python] jinja2.exceptions.UndefinedError: 'len' is undefined 해결하기

'김용환' 2018. 3. 27. 19:36



python3에서 


jinja2.exceptions.UndefinedError: 'len' is undefined 해결하려면


'|length'를 이용한다.


{% node.data|length == 0 %}