Add basic Excel download support for raw worked shifts

also, tweak response per python3
This commit is contained in:
Lance Edgar 2018-10-09 14:10:36 -05:00
parent 362173ef10
commit 94ba18eaee
2 changed files with 30 additions and 2 deletions

View file

@ -2145,8 +2145,8 @@ class MasterView(View):
os.remove(path)
response.content_length = len(response.body)
response.content_type = b'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
response.content_disposition = b'attachment; filename={}.xlsx'.format(self.get_grid_key())
response.content_type = str('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet')
response.content_disposition = str('attachment; filename={}.xlsx').format(self.get_grid_key())
return response
def get_xlsx_fields(self):