Created
July 8, 2019 07:35
-
-
Save akshar-raaj/2dc05386897518d4c13bcf14f936258d to your computer and use it in GitHub Desktop.
QuestionSerializer
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): | |
| choice_set = ChoiceSerializer(many=True) | |
| class Meta: | |
| model = Question | |
| fields = ('pub_date', 'question_text', 'choice_set') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment