class Customer(models.Model):
    pizzas_bought = models.ManyToManyField(Pizza, through=PizzaSold)


class PizzaSold(models.Model):
    customer = models.ForeignKey(Pizza)
pizza = models.ForeignKey(Customer)
Django How to use ManyRelatedManager