1

In my table and in the some record I have lot of link_img, but I want only the first link_img, what can I do ?

I have something like this in my temp

{% for link in sousimg %}

 {% if article.article_img.id == link.img_link.id %}

    {{ link.link_img }} 

 {% endif %}

{% endfor %}

1 Answers1

0

This type of question is already present so I suggest having a look at it.
django for loop counter break

You have to do a little bit of hit and trial in this case.

theshubhagrwl
  • 743
  • 9
  • 17