On 9/18/06, Tom Smith <[EMAIL PROTECTED]> wrote:
> I have...
>
>         p = Product.objects
>         if len(notsitelist)>=1:
>                 print "exluding sites: ", notsitelist
>                 p.exclude(fk_site__in=notsitelist)


p.exclude() returns a new QuerySet with the filtering, so you need to
grab the return value, like this:

if len(notsitelist)>=1:
    print "excluding sites: ", notsitelist
    p = p.exclude(fk_site__in=notsitelist)

-- 
"May the forces of evil become confused on the way to your house."
  -- George Carlin

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to