django template question (accessing a list)

前端 未结 4 1532
半阙折子戏
半阙折子戏 2021-01-07 04:14

I am writing a template for my first django website.

I am passing a list of dictionaries to the template in a variable. I also need to pass a few other lists which h

4条回答
  •  迷失自我
    2021-01-07 04:38

    Try using "slice" to access a list by index

    http://docs.djangoproject.com/en/dev/ref/templates/builtins/#slice

提交回复
热议问题