This commit is contained in:
Ross
2021-04-18 12:03:07 +01:00
parent 564167184b
commit 8918f1cd5b
4 changed files with 43 additions and 1 deletions
+8
View File
@@ -988,6 +988,14 @@ class ExamViewSet(viewsets.ModelViewSet):
queryset = Exam.objects.all().order_by('name')
serializer_class = ExamSerializer
def question_json_unbased(self, request, pk):
"""
No (file based) caching is enabled for unbased quesitons
"""
question = get_object_or_404(self.Exam, pk=pk)
question_json = question.get_json(pk, based=False)
return JsonResponse(question_json)
def question_json(request, pk):
question = get_object_or_404(Long, pk=pk)