MCPcopy
hub / github.com/django/django / none

Method none

django/db/models/query.py:1630–1634  ·  view source on GitHub ↗

Return an empty QuerySet.

(self)

Source from the content-addressed store, hash-verified

1628 )
1629
1630 def none(self):
1631 """Return an empty QuerySet."""
1632 clone = self._chain()
1633 clone.query.set_empty()
1634 return clone
1635
1636 ##################################################################
1637 # PUBLIC METHODS THAT ALTER ATTRIBUTES AND RETURN A NEW QUERYSET #

Callers 15

with_permMethod · 0.80
with_permMethod · 0.80
__init__Method · 0.80
get_querysetMethod · 0.80
get_dated_itemsMethod · 0.80
get_dated_itemsMethod · 0.80
__init__Method · 0.80
cleanMethod · 0.80
get_querysetMethod · 0.80
_apply_rel_filtersMethod · 0.80
test_empty_querysetMethod · 0.80

Calls 2

_chainMethod · 0.95
set_emptyMethod · 0.80

Tested by 15

test_empty_querysetMethod · 0.64
test_noneMethod · 0.64
test_ticket7235Method · 0.64
test_ticket7235_extraMethod · 0.64
test_ticket7181Method · 0.64
test_empty_querysetMethod · 0.64
test_values_subqueryMethod · 0.64
test_ticket_19151Method · 0.64
test_union_noneMethod · 0.64
test_union_none_sliceMethod · 0.64