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

AbotX : How do you create a parallel crawler that stays on and can be added to at run time from new requests -

testing - Detect whether test has failed within fixture -

android - Create single AAR file from multiple modules using Gradle -