feat: Enhance security by adding @login_required to multiple views and replacing print statements with logger.debug

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
Ross
2026-04-30 21:35:08 +01:00
co-authored by Copilot
parent 5d37cad48d
commit 2aff9516ac
13 changed files with 389 additions and 113 deletions
-2
View File
@@ -395,7 +395,6 @@ def mark_answer(request, exam_id, question_number, answer_id, override=False):
elif answer_list[-1] == answer_id:
previous_answer_id = answer_list[-2]
else:
print(answer_list.index(answer_id))
next_answer_id = answer_list[answer_list.index(answer_id) + 1]
previous_answer_id = answer_list[answer_list.index(answer_id) - 1]
@@ -955,7 +954,6 @@ def question_findings(request, question_id, finding_pk=None):
@require_POST
def combine_images_side_by_side(request, question_id):
image_ids = request.POST.getlist('combine-image-checkbox')
print(image_ids)
if len(image_ids) != 2:
return render(request, "shorts/combine_error.html", {"error": "Please select exactly two images."})
question = get_object_or_404(Question, pk=question_id)