iteye_19907 2009-03-27 12:05
浏览 1111
已采纳

django 模板访问数组的问题 Could not parse the remainder

[quote]
{% if menus and menus[0] %}
xxx
{% for menu in menus[0] %}
yyy
{% endfor %}
{% endif %}[/quote]

menus 是一个二维数组,但在if句和for句都有语法错误。

难道 django 模板里面不可以使用 menus[0] 这样的表达式吗?

  • 写回答

1条回答 默认 最新

报告相同问题?