Could not parse the remainder: '[0]' from 'item[0]' Django

前端 未结 1 2050
Happy的楠姐
Happy的楠姐 2021-02-07 03:47

I am trying to make a table with values I get from a list but I keep getting the error \"Could not parse the remainder: \'[0]\' from \'item[0]\'\" whenever I try to access an it

1条回答
  •  伪装坚强ぢ
    2021-02-07 04:20

    You would write the following to get item 0:

     {{ item.0 }}
    

    Similarly, to get the first item of the first item you'd write:

    {{ item.0.0 }}
    

    0 讨论(0)
提交回复
热议问题