1
distinct accepts an argument of what fields to operate on, so probably you want:
daily_count = ShipmentSubSortScanMapping.objects.all().distinct('shipment_id')
Source:stackexchange.com
1
distinct accepts an argument of what fields to operate on, so probably you want:
daily_count = ShipmentSubSortScanMapping.objects.all().distinct('shipment_id')