items = Item.objects.order_by('-category__created_date', '-created_date'
    ).select_related()
i = 0
cat = None
for item in items:
    pass
Optimized way of fetching parents with only latest child using django ORM