2012-11-05 113 views

回答

0

這是你在找什麼?

filter = models.Q(user=User.objects.none()) 
    for user in list: 
     filter |= models.Q(user=user) 

    #Returns mymodel instances filter for users in list or none 
    query_set = mymodel.objects.filter(filter)