How can you do a filter and do something like this in django
model.objects.filter(user_id = request.user.id , thing != 0)
I mean i wnat do something that it get only objects that their thing in not 0 .
CodePudding user response:
The exclude() method will do the job.
model.objects.filter(user_id = request.user.id).exclude(thing = 0)