I have the following Django 1.2 models:
class Category(models.Model): name = models.CharField(max_length=255) class Article(models.Model): title = m
Try:
preference = Preference.objects.get(**conditions) Article.objects.filter(categories__in = preference.categories.all())
Article.objects.filter(categories__in=myPreferenceObject.categories.all())