2👍
✅
you can make group
write only in QuestionSerializer
like:
class QuestionSerializer(ModelSerializer):
class Meta:
model = Question
fields = ('text','group')
extra_kwargs = {'group': {'write_only': True}}
learn more here
Source:stackexchange.com