В моем шаблоне django я хочу воспроизвести строку по количеству величин, например:
Something like repeating Material Request 67 14 times, 34 15 times and so on
for that I have retrieved quantity in a list like following:
d_docket = AllotmentDocket.objects.filter(parent_company = client_pk.pk, transaction_date__range =[start, end]).order_by('-transaction_date')
quan = list(d_docket.values_list('product1_quantity', flat=True))
which gives:
[14, 15, 15, 15, 15, 20, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 15, 13, 6, 15, 15, 10, 15, 15, 15, 7, 8]
But how can I loop over range of each element of quan
in django template ?
Current Template:
{% for i in query %}
{{i.sales_order.owner}} {{i.sales_order.pk}} {{i.sales_order.flow}} {{i.sales_order.kit}} {% endfor%}