Django - Display images in template using for loop
<p>I am working on a product site using django framework with bootstrap. I want to display images in for loop.<br>
I have done that using for loop and pictures are being displayed in order
but I wanted to display just 20 images at first and then use next button to load more 10 images and so on. <br>
Can it been done on the same page i.e. same URL.</p>

<pre><code>&lt;div class="div1" style="max-width: wrap content; height: 50em; padding-left: 7em;"&gt;

{% for p in product.types_set.all %}

    {% if p.available == True %}


    &lt;div class="img" align="center" style=" float: left; width: 20em; height: 25em;"&gt;

      &lt;img class="img-thumbnail" src="{{MEDIA_URL}}{{p.image.url}}" alt="image" style="width: 15em;"&gt;

    &lt;/div&gt;

       {% endif %}
    {% endfor %}

&lt;/div&gt;
</code></pre>