Skip to content

Commit

Permalink
Merge pull request #245 from pkozlov/pkozlov-to_encoding
Browse files Browse the repository at this point in the history
to_encoding functionality
  • Loading branch information
bmihelac committed Apr 22, 2015
2 parents a4ea2cf + e62c267 commit e31c966
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions import_export/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,8 @@ def export_action(self, request, *args, **kwargs):

queryset = self.get_export_queryset(request)
export_data = self.get_export_data(file_format, queryset)
if not file_format.is_binary() and self.to_encoding:
export_data = export_data.encode(self.to_encoding)
content_type = file_format.get_content_type()
# Django 1.7 uses the content_type kwarg instead of mimetype
try:
Expand Down

0 comments on commit e31c966

Please sign in to comment.