MCPcopy
hub / github.com/django/django / exclude

Method exclude

django/db/models/query.py:1655–1661  ·  view source on GitHub ↗

Return a new QuerySet instance with NOT (args) ANDed to the existing set.

(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

1653 return self._filter_or_exclude(False, args, kwargs)
1654
1655 def exclude(self, *args, **kwargs):
1656 """
1657 Return a new QuerySet instance with NOT (args) ANDed to the existing
1658 set.
1659 """
1660 self._not_support_combined_queries("exclude")
1661 return self._filter_or_exclude(True, args, kwargs)
1662
1663 def _filter_or_exclude(self, negate, args, kwargs):
1664 if (args or kwargs) and self.query.is_sliced:

Callers 15

validateMethod · 0.80
cleanMethod · 0.80
querysetMethod · 0.80
_perform_date_checksMethod · 0.80
validateMethod · 0.80
test_transformMethod · 0.80
test_expressionsMethod · 0.80
test_basicMethod · 0.80
test_non_asciiMethod · 0.80

Calls 2

_filter_or_excludeMethod · 0.95

Tested by 15

test_transformMethod · 0.64
test_expressionsMethod · 0.64
test_basicMethod · 0.64
test_non_asciiMethod · 0.64
test_transformMethod · 0.64
test_basicMethod · 0.64
test_transformMethod · 0.64
test_survives_cloneMethod · 0.64