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)
|
@action(methods=['post'], detail=False, perms_map={'post': 'question'}, serializer_class=Serializer)
|
||||||
def upload_paper(self, request):
|
def upload_paper(self, request):
|
||||||
doc_path = request.data.get('doc_path')
|
doc_path = request.data.get('doc_path')
|
||||||
# excel_path = settings.BASE_DIR + "/media/default/question.xlsx"
|
excel_path = settings.BASE_DIR + "/media/default/question.xlsx"
|
||||||
excel_path = "C:\code\data\question.xlsx"
|
# excel_path = "C:\code\data\question.xlsx"
|
||||||
timenow = timezone.now().strftime('%Y%m%d%H%M%S')
|
timenow = timezone.now().strftime('%Y%m%d%H%M%S')
|
||||||
question_excel_name = "question_excel_"+timenow
|
question_excel_name = "question_excel_"+timenow
|
||||||
question_excel = os.path.join(os.path.dirname(excel_path), question_excel_name)
|
question_excel = os.path.join(os.path.dirname(excel_path), question_excel_name)
|
||||||
|
|
Loading…
Reference in New Issue