I am creating a blog page in HTML. In the backend I'm using Django. I have created a general HTML template for every post. In Django admin when I upload the image and other data, I'm getting it in Frontend and setting the id of each post dynamically using an autogenerated id coming from Backend. My HTML template is this
<div class="row">
{% for blog in blogs_post %}
<div class="col-sm-3 offset-sm-1 col-12" id="{{ blog.id }}">
<div class="row">
<div class="col-12">
<img src="{{ blog.image }}" alt=" {{ blog.tittle }}" class="img-fluid">
</div>
<div class="col-12">
<h3>{{ blog.tittle }}</h3>
<p class="d-none" id="card-body">
<h6>{{ blog.description }}</h6>
</p>
{% if blog.url %}
<a href="{{ blog.url }}" type="submit" role="button" class="btn btn-info">Read more</a> {% endif %}
</div>
</div>
</div>
{% endfor %}
</div>
I want to use this
id="{{ blog.id }}"