Say I have 2 classes as:
class Bar(models.Model):
prop = IntegerField()
class Foo(models.Model):
bar = ManyToManyField(Bar)
I want to return a QuerySet containing model instances of bar that
match the query:
QuerySetOfFoos.objects.filter(bar__prop__gt=0)
Is there an easy way to do this? I know that in the model instance I
could do foo.bar_set but not sure how to do it over all of the
original QuerySet...
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.