I have a simple model like this:
class Auction(models.Model):
name = models.CharField()
class Item(models.Model):
auction = models.ForeignKey(Auction)
name = models.CharField()
price = models.FloatField()
class Bid(models.Model):
item = models.ForeignKey(Item)
user = models.ForeignKey(User)
price = models.FloatField()
users place bids for an item. Knowing that a user is allowed to place just one bid for each item. If I have the auction id, can I get all user objects (not simple usernames, like in a values_list()) that placed a bid in that auction?
EDIT: I would also like to avoid using ‘in’
1 Answer