summaryrefslogtreecommitdiff
path: root/api/serializers.py
blob: 919e4290f48d2214acee8a826d047a0a14570597 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from rest_framework import serializers
from yaksh.models import Question, Quiz, QuestionPaper, AnswerPaper


class QuestionSerializer(serializers.ModelSerializer):
    class Meta:
        model = Question
        fields = '__all__'


class QuizSerializer(serializers.ModelSerializer):
    class Meta:
        model = Quiz
        fields = '__all__'


class QuestionPaperSerializer(serializers.ModelSerializer):
    class Meta:
        model = QuestionPaper
        fields = '__all__'

class AnswerPaperSerializer(serializers.ModelSerializer):
    class Meta:
        model = AnswerPaper
        fields = '__all__'