Reputation: 1699
I have two models:
class Contact(models.Model):
name = models.CharField(max_length=255)
class Campaign(models.Model):
contact = models.ForeignKey(Contact, related_name="campaigns")
name = models.CharField(max_length=255)
How can I select all contacts that have campaign name='CampaignName' in Campaign table?
Upvotes: 0
Views: 78