1
0
forked from ScoDoc/ScoDoc

blackify + suppress cr-at-eol

This commit is contained in:
Jean-Marie Place 2021-09-17 10:26:20 +02:00
parent 42ef9f795f
commit 44117fb0e2
2 changed files with 31 additions and 30 deletions

View File

@ -68,10 +68,11 @@ class COLORS(Enum):
def send_from_flask(data, filename, mime=scu.XLSX_MIMETYPE):
filename = scu.make_filename(filename)
response = make_response(data)
response.headers['Content-Type'] = mime
response.headers['Content-Disposition'] = 'attachment; filename="%s"' % filename
response.headers["Content-Type"] = mime
response.headers["Content-Disposition"] = 'attachment; filename="%s"' % filename
return response
def send_excel_file(request, data, filename, mime=scu.XLSX_MIMETYPE):
"""publication fichier.
(on ne doit rien avoir émis avant, car ici sont générés les entetes)