.
This commit is contained in:
@@ -389,10 +389,18 @@ class ExamViews(View, LoginRequiredMixin):
|
|||||||
|
|
||||||
path= "{0}{1}/exam/{2}.json".format(settings.MEDIA_ROOT, 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)
|
url= "{0}{1}/exam/{2}.json".format(settings.MEDIA_URL, self.app_name, pk)
|
||||||
|
if request.GET.get('_'):
|
||||||
|
query_string = urllib.parse.urlencode({'_': request.GET.get('_')})
|
||||||
|
url = '{}?{}'.format(url, query_string)
|
||||||
|
return redirect(url)
|
||||||
|
|
||||||
|
|
||||||
if os.path.isfile(path) and not exam.recreate_json:
|
if os.path.isfile(path) and not exam.recreate_json:
|
||||||
#exam_json_cache["cached"] = True
|
#exam_json_cache["cached"] = True
|
||||||
|
if request.GET.get('_'):
|
||||||
|
query_string = urllib.urlencode({'_': request.GET.get('_')})
|
||||||
|
url = '{}?{}'.format(url, query_string)
|
||||||
|
return redirect(url)
|
||||||
return redirect(url)
|
return redirect(url)
|
||||||
return JsonResponse(exam_json_cache)
|
return JsonResponse(exam_json_cache)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user