Created
May 7, 2019 10:54
-
-
Save akshar-raaj/d849cca8bcc5a2e09ab126ea759dcae3 to your computer and use it in GitHub Desktop.
QuestionSerializer using ChoiceSerializer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class QuestionSerializer(serializers.ModelSerializer): | |
| choices = ChoiceSerializer(read_only=True, many=True) | |
| class Meta: | |
| model = Question | |
| fields = '__all__' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment