This commit is contained in:
Ross
2022-01-10 14:42:22 +00:00
parent 4542e38ff4
commit 8729189bcc
+4 -1
View File
@@ -7,7 +7,9 @@ from django.forms.models import model_to_dict
from django.shortcuts import render, get_object_or_404, redirect from django.shortcuts import render, get_object_or_404, redirect
from django.contrib.auth.decorators import login_required, user_passes_test from django.contrib.auth.decorators import login_required, user_passes_test
from django.urls.base import reverse
from django.utils import timezone from django.utils import timezone
from django.utils.html import format_html
from django.views.decorators.csrf import csrf_exempt from django.views.decorators.csrf import csrf_exempt
from django.core.exceptions import PermissionDenied, FieldError from django.core.exceptions import PermissionDenied, FieldError
@@ -555,7 +557,8 @@ class ExamViews(View, LoginRequiredMixin):
request, request,
f"{self.app_name}/base.html", f"{self.app_name}/base.html",
{ {
"simple_content": "Answer scores updated", "simple_content": format_html("""Answer scores updated <br/>
<a href='{}'>Return</a>""", reverse(f"{self.app_name}:exam_scores_id", kwargs={"pk": exam.pk}))
}, },
) )