Answer the question
In order to leave comments, you need to log in
How can I display the desired photo in a modal window?
The user on his profile page has several photos that he previously posted.
I display photos on the page through a for loop
{% for photo in photos %}
<div class="eLAPa">
<img src="{{ photo.photo.url }}">
</div>
{% endfor %}
Answer the question
In order to leave comments, you need to log in
You need to add an id to the pictures, read it when clicked, find the desired picture in a loop and display it on the screen
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question