二维数组Django

use*_*857 2 html python django django-templates

我的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)

ser*_*ach 10

{% 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)