From 4c95be03f4dd0f5099b5b8064a7c2fb6c3311adc Mon Sep 17 00:00:00 2001 From: Ross Date: Fri, 12 Mar 2021 09:02:13 +0000 Subject: [PATCH] . --- generic/views.py | 2 +- longs/views.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/generic/views.py b/generic/views.py index b7452aae..53812c59 100644 --- a/generic/views.py +++ b/generic/views.py @@ -373,7 +373,7 @@ class ExamViews(View, LoginRequiredMixin): raise Http404("No available exam") - exam_json_cache = cache.get("{}_exam_json_{}".format(self.app_name, pk)) + #exam_json_cache = cache.get("{}_exam_json_{}".format(self.app_name, pk)) path= "{0}{1}/exam/{2}.json".format(settings.MEDIA_ROOT, self.app_name, pk) url= "{0}{1}/exam/{2}.json".format(settings.MEDIA_URL, self.app_name, pk) diff --git a/longs/views.py b/longs/views.py index 2f8d127e..40bddab4 100755 --- a/longs/views.py +++ b/longs/views.py @@ -994,8 +994,8 @@ def question_json(request, pk): #if not exam.active: # raise Http404("No available exam") - path= "{0}longs/questions/{1}.json".format(settings.MEDIA_ROOT, question_id) - url= "{0}{1}/exam/{2}.json".format(settings.MEDIA_URL, self.app_name, pk) + path= "{0}longs/questions/{1}.json".format(settings.MEDIA_ROOT, pk) + url= "{0}longs/questions/{1}.json".format(settings.MEDIA_URL, pk) if os.path.isfile(path) and not question.recreate_json: return redirect(url)