Fix some response headers per python 3
This commit is contained in:
parent
25e5739b34
commit
44aa54f247
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue