python - Django Rest Framework Serialization error in ListAPIView -


i getting below error

error -- 'many' invalid keyword argument function"

in listapiview while serializing object.

class userserializer(serializers.modelserializer):      class meta:         model = user         fields = ('id', 'uuid', 'email', 'password', 'first_name', 'last_name', 'mobile_no', 'dob', 'username',)   class corporateprofileserializer(serializers.modelserializer):      user = userserializer(many=true)       class meta:         model = corporateprofile         fields = ('user', 'id', 'uuid', 'company_name', 'company_type',) 

views.py

class corporatelistview(listapiview):     serializer_class = corporateprofile     queryset = corporateprofile.objects.all() 

what doing wrong here?

there mistake in views. wrote model in serializer class instead of serializer class.

serializer_class = corporateprofileserializer 

Comments