Last element in django template list variable

后端 未结 0 913
北海茫月
北海茫月 2021-02-11 16:59

I would like to know how to filter out the last element of a list variable from the context object.

{% for d in data %}
    {{ d }},
{% endfor %}
相关标签:
回答
  • 消灭零回复
提交回复
热议问题