diff --git a/apps/edu/views.py b/apps/edu/views.py index 990f3c99..c6fa69ef 100644 --- a/apps/edu/views.py +++ b/apps/edu/views.py @@ -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('暂不支持') diff --git a/apps/inm/services.py b/apps/inm/services.py index 77d6c6fd..12023589 100644 --- a/apps/inm/services.py +++ b/apps/inm/services.py @@ -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 diff --git a/server/settings.py b/server/settings.py index 46fcc310..9c375324 100755 --- a/server/settings.py +++ b/server/settings.py @@ -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),