fix: 修改bug

This commit is contained in:
zty 2024-05-29 10:29:42 +08:00
parent abd05222c6
commit dae788d386
2 changed files with 3 additions and 3 deletions

View File

@ -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)