소스 검색

修改下载文件名

tanghongbin 4 년 전
부모
커밋
bcb9333804
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      Controller/AdminManage.py

+ 1 - 1
Controller/AdminManage.py

@@ -446,7 +446,7 @@ class AdminManage(TemplateView):
         user_qs = Device_User.objects.filter(subscribe_email=1).values('userEmail')
         print(user_qs)
         response = HttpResponse(content_type='application/vnd.ms-excel')
-        response['Content-Disposition'] = 'attachment; filename=UID' + time.strftime('-%Y-%m-%d-%H-%M-%S', time.localtime()) + '.xls'
+        response['Content-Disposition'] = 'attachment; filename=Email' + time.strftime('-%Y-%m-%d-%H-%M-%S', time.localtime()) + '.xls'
         workbook = xlwt.Workbook(encoding='utf-8')
         sheet1 = workbook.add_sheet('Email Address')