i have a Community app with a field of subscriber related to the accounts app but in the response it return counts instead of using account serializer
CommunitySerializer:
class CommunitySerializer(serializers.ModelSerializer):
class Meta:
model = Community
fields = ('name', 'about', 'subscribers', 'moderators')
AccountsSerializer:
class UserSerializer(serializers.ModelSerializer):
class Meta:
model = User
fields = ('username',)
It Return:
{
"name": "pcmasterrace",
"about": "Welcome to the official subreddit of the PC Master Race. In this subreddit, we celebrate and promote the ultimate gaming and working platform. Ascend to a level that respects your eyes, your wallet, your mind, and your heart. Ascend to... the PC Master Race.",
"community_rules": [
{
"rule": "Rule 1 - Off Topic",
"description": "DOnt fuck"
},
{
"rule": "Rule 2 - No tech support",
"description": "community_rulescommunity_rulescommunity_rulescommunity_rulescommunity_rules"
}
],
"subscribers": [
1
],
"moderators": [
1
]
}
community_rulesif that is not within theserializer?ForeignKeyprimary keys?