[Answer]-Django rest framework view does'nt show related table data

1👍

You need Serializer relations

class MemberDeclareSerializer(serializers.ModelSerializer):
    ...
    members = serializers.StringRelatedField(many=True)
    ...

Also, try to follow python naming conventions

class MemberDeclareRecept(models.Model):
    member=models.ForeignKey(Member,verbose_name='Name member ',null=True,related_name='members')

Leave a comment