i want to make a portfolio in django, i have a section in html that with {% for ... %} i connect it to my jobs list in dajngo to show my job's pictures,summary and title but in html code there is an id in this div that call another div in the code and when i perform a for loop this id is just repeat it self,how could i change this id in order to changed automatically?`
{% for job in jobdic.all %}
<div class="col-md-6 col-lg-4">
<a class="portfolio-item d-block mx-auto" **href="#portfolio-modal-1"**>
<div class="portfolio-item-caption d-flex position-absolute h-100 w-100">
<div class="portfolio-item-caption-content my-auto w-100 text-center text-white">
<i class="fas fa-search-plus fa-3x"></i>
</div>
</div>
<p>{{ job.summary }}</p>
<img class="img-fluid" src="{{ job.image.url }}" alt="{{job.title }}">
</a>
</div>
{% endfor %}
the problem area is in href that call another section in html with portfolio-modal-1 i need to write some code that can be change this portfolio-modal-1 to portfolio-modal-2 and 3 and ... automatically this is the section that its refers to :
{% for job in jobdic.all %}
<div class="portfolio-modal mfp-hide" id="portfolio-modal-1">
<div class="portfolio-modal-dialog bg-white">
<a class="close-button d-none d-md-block portfolio-modal-dismiss" href="#">
<i class="fa fa-3x fa-times"></i>
</a>
<div class="container text-center">
<div class="row">
<div class="col-lg-8 mx-auto">
<h2 class="text-secondary text-uppercase mb-0">Project Name</h2>
<hr class="star-dark mb-5">
<img class="img-fluid mb-5" src="{{ job.image.url }}" alt="">
<p class="mb-5">{{ job.summary }}</p>
<a class="btn btn-primary btn-lg rounded-pill portfolio-modal-dismiss" href="#">
<i class="fa fa-close"></i>
Close Project</a>
</div>
</div>
</div>
</div>
</div>
{% endfor %}