Let's say I have the following models
class Offer(models.Model):
skills_required = models.ManyToManyField(Skill, blank=True)
class Skill(models.Model)
title = models.CharField(max_length=80, primary_key=True)
class UserProfile(models.Model):
skills = models.ManyToManyField(Skill)
How can I filter Offer.objects with an instance of UserProfile in a way that skills_required of remaining offers would be a subset of user_profile.skills?