]> git.parisson.com Git - telemeta.git/commitdiff
fix csv content_type
authorGuillaume Pellerin <yomguy@parisson.com>
Thu, 13 Nov 2014 01:12:18 +0000 (02:12 +0100)
committerGuillaume Pellerin <yomguy@parisson.com>
Thu, 13 Nov 2014 01:12:18 +0000 (02:12 +0100)
telemeta/views/playlist.py

index 5ad9fec14c7d55d1c0f7451bc077e6bd050128a0..9cf6bd52e5f82e3921bf81d0081b67519484551f 100644 (file)
@@ -89,7 +89,7 @@ class PlaylistView(object):
     def playlist_csv_export(self, request, public_id, resource_type):
         playlist = Playlist.objects.get(public_id=public_id, author=request.user)
         resources = PlaylistResource.objects.filter(playlist=playlist)
-        response = HttpResponse(mimetype='text/csv')
+        response = HttpResponse(content_type='text/csv')
         response['Content-Disposition'] = 'attachment; filename='+playlist.title+'_'+resource_type+'.csv'
         writer = UnicodeWriter(response)
 
@@ -127,5 +127,6 @@ class PlaylistView(object):
                 for tag in tags:
                     data.append(element[tag])
                 writer.writerow(data)
+
         return response