Added Date into export-file-name

This commit is contained in:
Mawoka
2022-10-05 19:21:08 +02:00
parent 5c432b1fd9
commit 6940716fea
+3 -1
View File
@@ -270,5 +270,7 @@ async def export_quiz_answers(export_token: str, game_pin: str):
return StreamingResponse(
iter_file(),
media_type="application/vnd.ms-excel",
headers={"Content-Disposition": f"attachment;filename=ClassQuiz-{quiz.title}.xlsx"},
headers={
"Content-Disposition": f"attachment;filename=ClassQuiz-{quiz.title}-{datetime.now().strftime('%m-%d-%Y')}.xlsx" # noqa: E501
},
)