On Thu, 2009-04-16 at 18:20 -0700, Thierry wrote:
> Let's say I have a list of words in my database:
>
> ['bbb', 'aaa', 'zzz', 'ddd']
>
> How can I retrieve a list of the above excluding the following words
> ['aaa', 'zzz'] by using __in? I can do the above with:
>
>words_list = Words.obje
Let's say I have a list of words in my database:
['bbb', 'aaa', 'zzz', 'ddd']
How can I retrieve a list of the above excluding the following words
['aaa', 'zzz'] by using __in? I can do the above with:
words_list = Words.objects.exclude(
Q(word_name = 'aaa') | Q(word_name = 'zzz')
2 matches
Mail list logo