Skip to content

Commit

Permalink
Fix special character support for application submission CSV export
Browse files Browse the repository at this point in the history
  • Loading branch information
julianweng committed Jan 30, 2025
1 parent b98213c commit bbed7cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/clubs/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -6980,10 +6980,10 @@ def export(self, *args, **kwargs):
)
df = pd.DataFrame(ApplicationSubmissionCSVSerializer(data, many=True).data)
resp = HttpResponse(
content_type="text/csv",
content_type="text/csv; charset=utf-8-sig", # support special chars
headers={"Content-Disposition": "attachment;filename=submissions.csv"},
)
df.to_csv(index=True, path_or_buf=resp)
df.to_csv(index=True, path_or_buf=resp, encoding="utf-8-sig")
return resp

@action(detail=False, methods=["get"])
Expand Down

0 comments on commit bbed7cb

Please sign in to comment.