From dae788d3866d0686f4ff6c4219b2fbfc380e25a6 Mon Sep 17 00:00:00 2001 From: zty Date: Wed, 29 May 2024 10:29:42 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/apps/exam/views.py | 4 ++-- server/server/settings_dev.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/apps/exam/views.py b/server/apps/exam/views.py index 9af27bf..e0ceb1d 100644 --- a/server/apps/exam/views.py +++ b/server/apps/exam/views.py @@ -274,8 +274,8 @@ class PaperViewSet(ModelViewSet): @action(methods=['post'], detail=False, perms_map={'post': 'question'}, serializer_class=Serializer) def upload_paper(self, request): doc_path = request.data.get('doc_path') - # excel_path = settings.BASE_DIR + "/media/default/question.xlsx" - excel_path = "C:\code\data\question.xlsx" + excel_path = settings.BASE_DIR + "/media/default/question.xlsx" + # excel_path = "C:\code\data\question.xlsx" timenow = timezone.now().strftime('%Y%m%d%H%M%S') question_excel_name = "question_excel_"+timenow question_excel = os.path.join(os.path.dirname(excel_path), question_excel_name) diff --git a/server/server/settings_dev.py b/server/server/settings_dev.py index 9e8be51..be21fb2 100644 --- a/server/server/settings_dev.py +++ b/server/server/settings_dev.py @@ -24,7 +24,7 @@ DATABASES = { 'USER': 'cma', 'PASSWORD': 'cma123', # 'HOST': '172.16.80.102', - 'HOST': '127.0.0.1', + 'HOST': '127.0.0.1', 'PORT': '5432', }