fsock = open(document.file.path, 'r')
mimetype = mimetypes.guess_type(document.file.path)[0]
extension = mimetypes.guess_extension(mimetype)
- response = HttpResponse(fsock, mimetype=mimetype)
+ response = HttpResponse(fsock, content_type=mimetype)
response['Content-Disposition'] = "attachment; filename=%s%s" % \
(document.title.encode('utf8'), extension)
return response
fsock = open(document.file.path, 'r')
mimetype = mimetypes.guess_type(document.file.path)[0]
extension = mimetypes.guess_extension(mimetype)
- response = HttpResponse(fsock, mimetype=mimetype)
+ response = HttpResponse(fsock, content_type=mimetype)
return response