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', }