.
This commit is contained in:
+3
-3
@@ -688,7 +688,7 @@ class GenericViewBase:
|
|||||||
return JsonResponse(question_json)
|
return JsonResponse(question_json)
|
||||||
return JsonResponse({"status": "error"})
|
return JsonResponse({"status": "error"})
|
||||||
|
|
||||||
@user_passes_test(lambda u: u.is_superuser)
|
@method_decorator(user_passes_test(lambda u: u.is_superuser))
|
||||||
def user_answer_delete_multiple(self, request):
|
def user_answer_delete_multiple(self, request):
|
||||||
if request.is_ajax():
|
if request.is_ajax():
|
||||||
print(request.POST["answer_ids"])
|
print(request.POST["answer_ids"])
|
||||||
@@ -700,7 +700,7 @@ class GenericViewBase:
|
|||||||
return JsonResponse({"status": "success"})
|
return JsonResponse({"status": "success"})
|
||||||
return JsonResponse({"status": "error"})
|
return JsonResponse({"status": "error"})
|
||||||
|
|
||||||
@login_required
|
@method_decorator(login_required)
|
||||||
def question_detail(self, request, pk):
|
def question_detail(self, request, pk):
|
||||||
question = get_object_or_404(self.question_object, pk=pk)
|
question = get_object_or_404(self.question_object, pk=pk)
|
||||||
|
|
||||||
@@ -728,7 +728,7 @@ class GenericViewBase:
|
|||||||
{"question": question, "view_feedback": view_feedback},
|
{"question": question, "view_feedback": view_feedback},
|
||||||
)
|
)
|
||||||
|
|
||||||
@login_required
|
@method_decorator(login_required)
|
||||||
def question_user_answers(self, request, pk):
|
def question_user_answers(self, request, pk):
|
||||||
question = get_object_or_404(self.question_object, pk=pk)
|
question = get_object_or_404(self.question_object, pk=pk)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user