Created on Nov. 26, 2012, 11:49 p.m. by Hevok & updated by Hevok on May 2, 2013, 5:26 p.m.

The reverse() method reverses the order of the queryset elements:

reversed = queryset.reverse()

Its only effective if the queryset had a defined order (e.g. chained on order_by). In such its provides an intuitive way to retrieve the last few elements in reversed order.


Tags: queryset, rest, django
Categories: Tutorial, reST
Parent: QuerySet

Update entry (Admin) | See changes

Comment on This Data Unit