How to get highest bid in an auction bidding site Django

Thank you so much Ken, for your patience and guidance, learnt a lot from you.

I did later get the price by adding to my Auction model;

    def no_of_bids(self):
        return self.bidding.all().count()

    def last_bid(self):
        if self.no_of_bids() > 0:
            return self.bidding.aggregate(Max('new_bid'))['new_bid__max']
        else:
            return self.starting_bid

All this was possible because of YOU. I appreciate the time you took to answer my questions and the knowledge you’ve passed.

One day this noob will get there. Have a lovely day.

1 Like