Answers for "django queryset last 10"

0

django queryset last 10

last_ten = Messages.objects.filter(since=since).order_by('-id')[:10]
last_ten_in_ascending_order = reversed(last_ten)
Posted by: Guest on October-15-2020

Python Answers by Framework

Browse Popular Code Answers by Language