python - Django Queryset, accessing all query except those belongs to logged users? -


i know this:

queryset = item.objects.filter(user=self.request.user) 

i want query opposite of that, items of user except logged one.

the opposite of filter exclude:

queryset = item.objects.exclude(user=self.request.user) 

Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -