Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

remove last comma forloop django

{% for product_in_series in series.get_products %}{%spaceless%}
    {% with product_in_series.product as product %}
    {%if not forloop.first%}
        "<img src='{% version product.get_overview 'page_image' %}'>"
        {%if not forloop.last%},{%endif%}
    {%endif%}
    {% endwith %}
{%endspaceless%}{% endfor %}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #remove #comma #forloop #django
ADD COMMENT
Topic
Name
3+6 =