.
This commit is contained in:
+2
-2
@@ -320,7 +320,7 @@ class ExamViews(View, LoginRequiredMixin):
|
|||||||
for exam in exams:
|
for exam in exams:
|
||||||
if exam.active:
|
if exam.active:
|
||||||
if exam.json_creation_time:
|
if exam.json_creation_time:
|
||||||
creation_time = exam.json_creation_time.isoformat()
|
creation_time = exam.json_creation_time.timestamp()
|
||||||
else:
|
else:
|
||||||
creation_time = "None"
|
creation_time = "None"
|
||||||
active_exams["exams"].append(
|
active_exams["exams"].append(
|
||||||
@@ -381,7 +381,7 @@ class ExamViews(View, LoginRequiredMixin):
|
|||||||
|
|
||||||
with open(path, "w+") as f:
|
with open(path, "w+") as f:
|
||||||
exam_json = exam.get_exam_json()
|
exam_json = exam.get_exam_json()
|
||||||
exam_json["generated"] = datetime.now().isoformat()
|
exam_json["generated"] = datetime.now().timestamp()
|
||||||
f.write(json.dumps(exam_json))
|
f.write(json.dumps(exam_json))
|
||||||
|
|
||||||
exam.recreate_json = False
|
exam.recreate_json = False
|
||||||
|
|||||||
+1
-1
@@ -182,7 +182,7 @@ class Long(models.Model):
|
|||||||
"title": "{}",
|
"title": "{}",
|
||||||
"type": "long",
|
"type": "long",
|
||||||
"generated": "{}",
|
"generated": "{}",
|
||||||
""".format(q.history, datetime.datetime.now().isoformat())
|
""".format(q.history, datetime.datetime.now().timestamp())
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user