1👍
✅
messages = Message.objects.filter(thread__id__in=[1,2,3]).order_by('date')[:10]
using the in
and order_by
queryset methods, querying across a relationship in reverse, and slicing to limit the results
Source:stackexchange.com