I have the following models:
class Topping(models.Model):
...
class Pizza(models.Model):
toppings = models.ManyToManyField(Topping)
I then have a topping object:
cheese = Topping.objects.get(name='cheese')
I then find all pizzas with the cheese topping with the following query:
Pizza.objects.all().filter(toppings=cheese)
The above seems to be working but is it the right way to do it?