Gin*_*nni 4 python django google-app-engine
{% for frequency in patient_meds.frequency %}
{% if frequency == "7" %}
<td>Hellow</td>
{% endif %}
{% endfor%}
Run Code Online (Sandbox Code Playgroud)
得到错误
TemplateSyntaxError:'if'语句格式不正确
我不知道我要做什么请帮帮我...
如果您使用的是app引擎附带的Django默认版本(v0.96),请尝试以下语法:
{% for frequency in patient_meds.frequency %}
{% ifequal frequency "7" %}
<td>Hellow</td>
{% endif %}
{% endfor%}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1351 次 |
| 最近记录: |