Say I have serializers as below.  

class AbcSerializer(serializers.ModelSerializer):
    class Meta:
    model = Abc
    fields = ('a',) # there could be other fields too in model.
class XyzSerializer(serializers.ModelSerializer):
    a = AbcSerializer(many=True)
        class Meta:
            model = Xyz
            fields = '__all__'  

this gives me list of dictionaries like 

    [{a: 1}, {a: 2}] 


is there any parameter like flat=True, which would give me a flat list 

    [1, 2]

You received this message because you are subscribed to the Google Groups 
"Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
For more options, visit

Reply via email to