I have an html file in my django project as follows:
<body>
<div class="row">
<div class="col-sm-3">
<ul class="list-group">
{% for image in images %}
<li class="list-group-item">{{ image.name}}
<img class="img-responsive" src='http://krishna.com{{ image.path }}' />
</li>
{% endfor %}
</ul>
</div>
<div class="col-sm-9">
<ul class="list-group">
{% for image in images %}
<li class="list-group-item">{{ image.name}}
<img class="img-responsive" src='http://krishna.com{{ image.path }}' />
</li>
{% endfor %}
</ul>
</div>
</div>
</body>
the content is showing for the <div class="col-sm-3">
but no content is being shown for <div class="col-sm-9">
In the image below, even thought the jinja code is same for both the divs, it shows only on one side.
One may ask why i am doing. I am just testing.
Edit:
I am generating the list in the following way:
def gallery(request):
import os, sys
img_list = os.scandir('/home/shared/pictures')
return render(request,'blog/gallery.html', {'images': img_list})