Browse Source

修改content_type

locky 2 năm trước cách đây
mục cha
commit
6429290702

+ 1 - 1
AdminController/ServeManagementController.py

@@ -694,7 +694,7 @@ class serveManagement(View):
                     for index, value in enumerate(col_value_list):
                     for index, value in enumerate(col_value_list):
                         wt_sheet.write(row_start, index, value)
                         wt_sheet.write(row_start, index, value)
                     row_start += 1
                     row_start += 1
-            res = HttpResponse(content_type='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet')
+            res = HttpResponse(content_type='application/vnd.ms-excel')
             res['Content-Disposition'] = 'attachment; filename={}'.format(escape_uri_path(file.name))
             res['Content-Disposition'] = 'attachment; filename={}'.format(escape_uri_path(file.name))
             wt_book.save(res)
             wt_book.save(res)
             return res
             return res