fix: 修改bug
This commit is contained in:
parent
abd05222c6
commit
dae788d386
|
@ -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)
|
||||
|
|
|
@ -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',
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue