MCPcopy
hub / github.com/django/django / reverse

Method reverse

django/db/models/query.py:1925–1931  ·  view source on GitHub ↗

Reverse the ordering of the QuerySet.

(self)

Source from the content-addressed store, hash-verified

1923 return clone
1924
1925 def reverse(self):
1926 """Reverse the ordering of the QuerySet."""
1927 if self.query.is_sliced:
1928 raise TypeError("Cannot reverse a query once a slice has been taken.")
1929 clone = self._chain()
1930 clone.query.standard_ordering = not clone.query.standard_ordering
1931 return clone
1932
1933 def defer(self, *fields):
1934 """

Callers 15

latestMethod · 0.95
lastMethod · 0.95
get_path_from_parentMethod · 0.45
deleteMethod · 0.45
test_reverse_orderingMethod · 0.45
test_ticket7235Method · 0.45

Calls 1

_chainMethod · 0.95