Модель отношений django

Буду признателен за помощь. У меня есть две модели. В модели Bids вы найдете current_bid_cmp. Я бы хотел, чтобы из модели ListingAuctions можно было получить доступ к соответствующему current_bid_cmp из модели Bids. Я нашел информацию только для выполнения запросов из модели, которая содержит foreingKey.

Мое мнение: Я использую get_context_data, потому что я пробовал другие запросы. возможно, это не более подходящий вариант

class index(ListView):
    
    model = ListingAuctions
    template_name = "auctions/index.html"

    def get_context_data(self, **kwargs):
            
            context = super().get_context_data(**kwargs)
            context['object'] = ListingAuctions.objects.all()
            
            
            
            return context

Мои модели:

class ListingAuctions(BaseModel):

   title_auction = models.CharField('Title of the auction',max_length = 150, unique = True)
   description = models.TextField('Description')
   user = models.ForeignKey(User, on_delete = models.CASCADE)
   category = models.ForeignKey(Category, on_delete = models.CASCADE)
   initial_bid = models.FloatField(default=False)
   content = models.TextField('Content of auction')
   image = models.ImageField('Referential Image', null=True, 
   upload_to = 'images_auctions', max_length = 255, default= 'noimage.png')
   
class Bids(BaseModel):
   user = models.ForeignKey(User, on_delete = models.CASCADE, related_name='offer_user')
   listing_auctions = models.ForeignKey(ListingAuctions,null=True, on_delete= models.CASCADE, related_name='l_auctions')
   initialized_bid = models.BooleanField(default=False)
   current_bid_cmp = models.FloatField('Current Bid Cmp',blank=True, null=True )
   offer = models.FloatField(default=0 ,null=True, blank=True)
   

Мой HTML

Текущая ставка: $ {{post.l_auctions.current_bid_cmp}}
это мой attemp l_auctions это имя relate из listing_auctions в модели Bids. Post - это объект ListingAuction:

{% for post in object_list %}
<div class=" col-md-4 mt-4 ">

    <div class="card " style="width: 18rem;">
        <a  href="{% url 'auctions_detail' post.pk %}">
      <img class="card-img-top img-fluid" src="{{ post.image.url }}" alt="Card image cap" >
      </a>
      
      <div class="card-body">
        <a class="darklink" href="{% url 'auctions_detail' post.pk %}"> <h5 class="card-title">{{post.title_auction}}</h5></a>
        <h5>Starting bid: $ {{post.initial_bid}}</h5>
        <h5>Current bid: $ {{post.l_auctions.current_bid_cmp}}</h5>
        <p class="card-text">{{post.content | truncatechars:700 }}</p>
        <a href=" {% url 'auctions_detail' post.pk %}" class="btn btn-danger btn-block">Show Auction</a>
      </div>
    </div>
            
</div>
{% endfor %}

Попробуйте это в своем шаблоне:

{{ post.l_auctions.get.current_bid_cmp }}

Используйте в своем шаблоне Jinja

 {{object_list[0].l_auctions.current_bid_cmp}}
Вернуться на верх