📜  删除最后一个逗号 forloop django - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:35.838000             🧑  作者: Mango

代码示例1
{% for product_in_series in series.get_products %}{%spaceless%}
    {% with product_in_series.product as product %}
    {%if not forloop.first%}
        ""
        {%if not forloop.last%},{%endif%}
    {%endif%}
    {% endwith %}
{%endspaceless%}{% endfor %}