Fix some response headers per python 3

This commit is contained in:
Lance Edgar 2019-06-13 14:25:54 -05:00
parent 25e5739b34
commit 44aa54f247

View file

@ -164,9 +164,9 @@ class InventoryWorksheet(View):
department = departments.get(self.request.params['department'])
if department:
body = self.write_report(department)
response = Response(content_type=b'text/html')
response.headers[b'Content-Length'] = len(body)
response.headers[b'Content-Disposition'] = b'attachment; filename=inventory.html'
response = Response(content_type=str('text/html'))
response.headers[str('Content-Length')] = len(body)
response.headers[str('Content-Disposition')] = str('attachment; filename=inventory.html')
response.text = body
return response