This commit is contained in:
Ross
2021-03-08 12:37:07 +00:00
parent f1295f4eb0
commit 236a26934d
2 changed files with 4 additions and 0 deletions
+3
View File
@@ -384,6 +384,9 @@ class ExamViews(View, LoginRequiredMixin):
if not exam.active: if not exam.active:
raise Http404("No available exam") raise Http404("No available exam")
return redirect("{}:question_json".format(self.app_name), pk=sk)
redirect()
question_json_cache = cache.get("{}_question_json_{}".format(self.app_name, sk)) question_json_cache = cache.get("{}_question_json_{}".format(self.app_name, sk))
if question_json_cache is not None and not question.recreate_json: if question_json_cache is not None and not question.recreate_json:
+1
View File
@@ -176,6 +176,7 @@ class Long(models.Model):
with open(path, "w+") as f: with open(path, "w+") as f:
f.write(""" f.write("""
{{
"title": {}, "title": {},
"image_titles": {}, "image_titles": {},
"type": "long", "type": "long",