我的django应用程序中有一个二维数组,我需要传递给html模板.
我如何使HTML处理二维数组?
{% block content %}
<h2>Survey</h2>
<form>
{% for q in question %}
<p>{{q[0]}}</p>
<p>{{q[1]}}</p>
{% endfor %}
<input type="submit" value="submit">
</form>
{% endblock %}
Run Code Online (Sandbox Code Playgroud)
我收到了错误:
Could not parse the remainder: '[0]' from 'q[0]'
Run Code Online (Sandbox Code Playgroud)