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 
like  

    [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 
to django-rest-framework+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to