Reverse the ordering of the QuerySet.
(self)
| 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 | """ |