瀏覽代碼

修改订阅邮件的下载文件名

tanghongbin 4 年之前
父節點
當前提交
92c49064ec
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Controller/AdminManage.py

+ 1 - 1
Controller/AdminManage.py

@@ -647,7 +647,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')