0
나는 jinja
이라는 템플릿을 쓰고있다. HTML 파일, 나는 썼다 :jinja2 gloable set doesnt work
{% set tmpx, tmpy = 0 %}
{% for greeting in greetings %}
{% if greeting.author %}
{% tmpx = greeting.data_x %}
{% tmpy = greeting.data_y %}
{% endif %}
{% endfor %}
결과는 프로그램이 tmpx
, tmpy
을 찾을 수 있습니다. 그래서 글로벌 세트를 사용하는 방법에 대해 혼란스러워합니다.