]> git.parisson.com Git - timeside.git/commitdiff
Server: replace deprecated parameter 'mimetype' in HttpResponse
authorThomas Fillon <thomas@parisson.com>
Tue, 2 Dec 2014 15:22:26 +0000 (16:22 +0100)
committerThomas Fillon <thomas@parisson.com>
Tue, 2 Dec 2014 15:22:26 +0000 (16:22 +0100)
timeside/server/views.py

index 4cc4578c84d0d1ef68a8d1f96f3a004c972a39bf..166dcf8b175d0f4e74333de75750457307cd8f55 100644 (file)
@@ -130,7 +130,7 @@ class ResultAnalyzerView(View):
         result = Result.objects.get(pk=kwargs['pk'])
         container = AnalyzerResultContainer()
         return HttpResponse(container.from_hdf5(result.hdf5.path).to_json(),
-                            mimetype='application/json')
+                            content_type='application/json')
 
 
 class ResultGrapherView(View):
@@ -140,7 +140,7 @@ class ResultGrapherView(View):
     def get(self, request, *args, **kwargs):
         result = Result.objects.get(pk=kwargs['pk'])
         return HttpResponse(stream_from_file(result.file.path),
-                            mimetype='image/png')
+                            content_type='image/png')
 
 
 class ResultEncoderView(View):
@@ -150,7 +150,7 @@ class ResultEncoderView(View):
     def get(self, request, *args, **kwargs):
         result = Result.objects.get(pk=kwargs['pk'])
         return HttpResponse(stream_from_file(result.file.path),
-                            mimetype=result.mime_type)
+                            content_type=result.mime_type)
 
 
 class ItemDetail(DetailView):