I have a model Color:
class Color(models.Model):
color = models.CharField(max_length=32)
def __str__(self):
return self.color
And my Product model:
class Product(models.Model):
...
color = models.ForeignKey('Color', on_delete=CASCADE)
...
So i need to create a filter that i'll able to get for example all red, blue or yellow products
How can i do that?