class DistinctAlertSerializer(serializers.ModelSerializer):
    entities = EntitySerializer(many=True)
entity_to_alert_map = EntityToAlertMap(source='entitytoalertmap_set', many=True
    )


class Meta:
    pass
Django serializing model with custom many to many mapping