From: Thomas Fillon Date: Wed, 22 Mar 2017 16:51:05 +0000 (+0100) Subject: The mimetype argument has been deprecated in HttpResponse in favor of content_type X-Git-Tag: 1.7.0~2^2~22^2~3 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=ace7cd29710d5d93dc254d31a6a4470f57cb99d8;p=telemeta.git The mimetype argument has been deprecated in HttpResponse in favor of content_type --- diff --git a/telemeta/views/item.py b/telemeta/views/item.py index c5e59407..1af4b238 100644 --- a/telemeta/views/item.py +++ b/telemeta/views/item.py @@ -304,14 +304,14 @@ class ItemView(ItemBaseMixin): if 'mp4' in extension: mime_type = 'video/mp4' video = item.file.path - response = StreamingHttpResponse(stream_from_file(video), mimetype = mime_type) + response = StreamingHttpResponse(stream_from_file(video), content_type = mime_type) response['Content-Disposition'] = 'attachment' return response if 'webm' in extension: mime_type = 'video/webm' video = item.file.path - response = StreamingHttpResponse(stream_from_file(video), mimetype = mime_type) + response = StreamingHttpResponse(stream_from_file(video), content_type = mime_type) response['Content-Disposition'] = 'attachment' return response @@ -349,7 +349,7 @@ class ItemView(ItemBaseMixin): proc.write_metadata() except: pass - response = StreamingHttpResponse(stream_from_file(source), mimetype = mime_type) + response = StreamingHttpResponse(stream_from_file(source), content_type = mime_type) else: media = self.cache_export.dir + os.sep + file if not self.cache_export.exists(file) or not flag.value: