Suppose I have the following models:

class Tag(models.Model):
  card = models.ForeignKey('Card')
  name = models.CharField(max_length=10)

class Card(models.Model):
  # whatever....

Say I have a list, like the following:  words = ['christmas', 'mother']

This list can be of variable length.  How can I write a query that
will return a list of Card objects that match ALL (not any) of the
words?  Is there a way to do it in a line or two without traversing
all of the card objects?

-- 
Adam Olsen
http://www.vimtips.org
http://last.fm/user/synic

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to