summaryrefslogtreecommitdiff
path: root/api/serializers.py
diff options
context:
space:
mode:
Diffstat (limited to 'api/serializers.py')
-rw-r--r--api/serializers.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/api/serializers.py b/api/serializers.py
new file mode 100644
index 0000000..919e429
--- /dev/null
+++ b/api/serializers.py
@@ -0,0 +1,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__'