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
Post a Comment