diff options
author | Paolo Melchiorre <paulox@paulox.net> | 2014-07-02 14:37:17 +0200 |
---|---|---|
committer | Paolo Melchiorre <paulox@paulox.net> | 2014-07-02 14:37:17 +0200 |
commit | 690770de89e9f82808f3524be8c9bc3eac553780 (patch) | |
tree | 0ba17f346c176728e4c871297d655dbd5c9f9e92 | |
parent | a56c03c09be3452c370251fdf8387c83fa6c9d5a (diff) | |
download | django-wkhtmltopdf-690770de89e9f82808f3524be8c9bc3eac553780.tar.gz django-wkhtmltopdf-690770de89e9f82808f3524be8c9bc3eac553780.tar.bz2 django-wkhtmltopdf-690770de89e9f82808f3524be8c9bc3eac553780.zip |
Removed mimetype from response for Django 1.7 compatibility. See https://docs.djangoproject.com/en/dev/internals/deprecation/#deprecation-removed-in-1-7
-rw-r--r-- | wkhtmltopdf/views.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/wkhtmltopdf/views.py b/wkhtmltopdf/views.py index 2f1945d..2d91224 100644 --- a/wkhtmltopdf/views.py +++ b/wkhtmltopdf/views.py @@ -15,14 +15,13 @@ from .utils import (content_disposition_filename, make_absolute_paths, class PDFResponse(HttpResponse): """HttpResponse that sets the headers for PDF output.""" - def __init__(self, content, mimetype=None, status=200, content_type=None, + def __init__(self, content, status=200, content_type=None, filename=None, show_content_in_browser=None, *args, **kwargs): if content_type is None: content_type = 'application/pdf' super(PDFResponse, self).__init__(content=content, - mimetype=mimetype, status=status, content_type=content_type) self.set_filename(filename, show_content_in_browser) @@ -44,7 +43,7 @@ class PDFResponse(HttpResponse): class PDFTemplateResponse(TemplateResponse, PDFResponse): """Renders a Template into a PDF using wkhtmltopdf""" - def __init__(self, request, template, context=None, mimetype=None, + def __init__(self, request, template, context=None, status=None, content_type=None, current_app=None, filename=None, show_content_in_browser=None, header_template=None, footer_template=None, @@ -53,7 +52,6 @@ class PDFTemplateResponse(TemplateResponse, PDFResponse): super(PDFTemplateResponse, self).__init__(request=request, template=template, context=context, - mimetype=mimetype, status=status, content_type=content_type, current_app=None, |