Adding charset utf-8 to all csv exports content-type header
parent
d9a8c934b0
commit
2a83cb73e8
|
@ -171,7 +171,7 @@ class IssueViewSet(OCCResourceMixin, HistoryResourceMixin, WatchedResourceMixin,
|
|||
project = get_object_or_404(Project, issues_csv_uuid=uuid)
|
||||
queryset = project.issues.all().order_by('ref')
|
||||
data = services.issues_to_csv(project, queryset)
|
||||
csv_response = HttpResponse(data.getvalue(), content_type='application/csv')
|
||||
csv_response = HttpResponse(data.getvalue(), content_type='application/csv; charset=utf-8')
|
||||
csv_response['Content-Disposition'] = 'attachment; filename="issues.csv"'
|
||||
return csv_response
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ class TaskViewSet(OCCResourceMixin, HistoryResourceMixin, WatchedResourceMixin,
|
|||
project = get_object_or_404(Project, tasks_csv_uuid=uuid)
|
||||
queryset = project.tasks.all().order_by('ref')
|
||||
data = services.tasks_to_csv(project, queryset)
|
||||
csv_response = HttpResponse(data.getvalue(), content_type='application/csv')
|
||||
csv_response = HttpResponse(data.getvalue(), content_type='application/csv; charset=utf-8')
|
||||
csv_response['Content-Disposition'] = 'attachment; filename="tasks.csv"'
|
||||
return csv_response
|
||||
|
||||
|
|
|
@ -112,7 +112,7 @@ class UserStoryViewSet(OCCResourceMixin, HistoryResourceMixin, WatchedResourceMi
|
|||
project = get_object_or_404(Project, userstories_csv_uuid=uuid)
|
||||
queryset = project.user_stories.all().order_by('ref')
|
||||
data = services.userstories_to_csv(project, queryset)
|
||||
csv_response = HttpResponse(data.getvalue(), content_type='application/csv')
|
||||
csv_response = HttpResponse(data.getvalue(), content_type='application/csv; charset=utf-8')
|
||||
csv_response['Content-Disposition'] = 'attachment; filename="userstories.csv"'
|
||||
return csv_response
|
||||
|
||||
|
|
Loading…
Reference in New Issue