diff --git a/README.md b/README.md index 6b1d321..c18439c 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ python3 main.py On Windows: ```bash -python main.py +python3 main.py ``` diff --git a/main.py b/main.py index a966e70..b19ebce 100644 --- a/main.py +++ b/main.py @@ -1237,8 +1237,14 @@ def report(): return redirect("/login") account = account_module.check_account(request.cookies.get("account")) + csv = '\n'.join(account_module.generateReport(account)) + # Create a download - return jsonify(account_module.generateReport(account)) + response = make_response(csv) + response.headers["Content-Disposition"] = "attachment; filename=report.csv" + response.headers["Content-Type"] = "text/csv" + return response + #endregion