I have a model of the form:

class Jobs(models.Model):
        names  = models.ManyToManyField(Workers)

class Workers(modesl.Model):
     is_a_problem = True


And I want the set of jobs that are done by workers who are a problem.

Something like

Jobs.objects.filter(names__is_contained_in=Workers.objects.filter(is_a_problem=True))

Obviously is_contained_in is not a valid lookup, so I would like to know
how to do this please.

Thanks
Jonty

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANOQRbz0TH53ix2hOCE7w8GkJMKPSB0utpzZgDzrAdXqn-Xzgw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to