This commit is contained in:
zty 2024-12-11 12:18:11 +08:00
commit 4791716ec9
3 changed files with 4 additions and 5 deletions

View File

@ -124,7 +124,6 @@ class ExamViewSet(CustomModelViewSet):
AnswerDetail.objects.bulk_create(details)
sr = ExamRecordInitSerizlier(er)
res_data = sr.data
print(res_data)
res_data.update({"chance_used": chance_used})
return Response(sr.data, status=201)
raise ParseError('暂不支持')

View File

@ -337,8 +337,4 @@ def daoru_mb(path: str):
material=material, batch=batch, warehouse=warehouse, defaults={"material": material, "batch": batch, "warehouse": warehouse, "count": count, "id": idWorker.get_id()}
)
cal_material_count([material.id])
# if not is_created:
# mb.count += count
# mb.save()
print(f"{i}行数据导入成功")
i = i + 1

View File

@ -221,6 +221,10 @@ REST_FRAMEWORK = {
'user': '200/second'
}
}
# session配置
SESSION_ENGINE = 'django.contrib.sessions.backends.cache'
CSRF_COOKIE_NAME = 'csrftoken'
# simplejwt配置
SIMPLE_JWT = {
'ACCESS_TOKEN_LIFETIME': timedelta(days=7),