Use
Python’s standard list-slicing syntax.
———–
e.g.,
>>>Card.objects.order_by(”name”)[0]
First one only
>>>Card.objects.order_by(”name”)[0:2]
The first two objects will be returned
Use
Python’s standard list-slicing syntax.
———–
e.g.,
>>>Card.objects.order_by(”name”)[0]
First one only
>>>Card.objects.order_by(”name”)[0:2]
The first two objects will be returned