Instead of using filter you need to use exclude:
     http://www.djangoproject.com/documentation/db-api/#exclude-kwargs


On 19 Jun 2008, at 19:17, Stuart Grimshaw wrote:

>
> I've a horrible feeling this is going to be a really easy answer, but
> I can't see it in the manual anywhere, but how do I do this with
> Django model filtering:
>
> SELECT * FROM auth_user WHERE id NOT IN (1,2,3)
>
> I can do the opposite easy enough
>
> User.objects.filter(id__in[1,2,3])
>
> but what's the opposite of id__in ?
>
> (I'm off to look at the manual again, and Stu's law of software states
> that th answer will now jump out at me as soon as I hit "Send")
>
> --  
> -S
>
> Follow me on Twitter: http://twitter.com/stubbs
> Blog: http://stubblog.wordpress.com
> My art: http://stuartgrimshaw.imagekind.com
> Stock Images: http://psc.photoshelter.com/user/stuartgrimshaw
>
> >


Cheers,
--
Ray Tran
Artran Ltd
[EMAIL PROTECTED]
www.artran.co.uk


--~--~---------~--~----~------------~-------~--~----~
To post: [email protected]
To unsubscribe: [EMAIL PROTECTED]
Feeds available at http://groups.google.com/group/python-north-west/feeds
For more options: http://groups.google.com/group/python-north-west
-~----------~----~----~----~------~----~------~--~---

Reply via email to