diff options
author | Marc Tamlyn <marc.tamlyn@gmail.com> | 2012-07-27 11:31:48 +0100 |
---|---|---|
committer | Marc Tamlyn <marc.tamlyn@gmail.com> | 2012-07-27 11:31:48 +0100 |
commit | 887ab7ce4ee31cf924e28f3c85783b5cf8352cc1 (patch) | |
tree | 6ed31ce112973a6f776397f587ef0060a09eb7f5 /wkhtmltopdf | |
parent | 9fe6391baa20c87842dd8475b6d8732d0a34b24b (diff) | |
download | django-wkhtmltopdf-887ab7ce4ee31cf924e28f3c85783b5cf8352cc1.tar.gz django-wkhtmltopdf-887ab7ce4ee31cf924e28f3c85783b5cf8352cc1.tar.bz2 django-wkhtmltopdf-887ab7ce4ee31cf924e28f3c85783b5cf8352cc1.zip |
Remove deprecated methods/views.
Diffstat (limited to 'wkhtmltopdf')
-rw-r--r-- | wkhtmltopdf/views.py | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/wkhtmltopdf/views.py b/wkhtmltopdf/views.py index fff98c8..20002bd 100644 --- a/wkhtmltopdf/views.py +++ b/wkhtmltopdf/views.py @@ -2,7 +2,6 @@ from __future__ import absolute_import from re import compile from tempfile import NamedTemporaryFile -import warnings from django.conf import settings from django.http import HttpResponse @@ -38,13 +37,6 @@ class PDFResponse(HttpResponse): del self['Content-Disposition'] -class PdfResponse(PDFResponse): - def __init__(self, content, filename): - warnings.warn('PdfResponse is deprecated in favour of PDFResponse. It will be removed in version 1.', - PendingDeprecationWarning, 2) - super(PdfResponse, self).__init__(content, filename=filename) - - class PDFTemplateResponse(TemplateResponse, PDFResponse): """Renders a Template into a PDF using wkhtmltopdf""" @@ -229,11 +221,6 @@ class PDFTemplateView(TemplateView): def get_cmd_options(self): return self.cmd_options - def get_pdf_kwargs(self): - warnings.warn('PDFTemplateView.get_pdf_kwargs() is deprecated in favour of get_cmd_options(). It will be removed in version 1.', - PendingDeprecationWarning, 2) - return self.get_cmd_options() - def render_to_response(self, context, **response_kwargs): """ Returns a PDF response with a template rendered with the given context. @@ -261,29 +248,3 @@ class PDFTemplateView(TemplateView): context=context, **response_kwargs ) - - -class PdfTemplateView(PDFTemplateView): #TODO: Remove this in v1.0 - orientation = 'portrait' - margin_bottom = 0 - margin_left = 0 - margin_right = 0 - margin_top = 0 - - def __init__(self, *args, **kwargs): - warnings.warn('PdfTemplateView is deprecated in favour of PDFTemplateView. It will be removed in version 1.', - PendingDeprecationWarning, 2) - super(PdfTemplateView, self).__init__(*args, **kwargs) - - def get_cmd_options(self): - return self.get_pdf_kwargs() - - def get_pdf_kwargs(self): - kwargs = { - 'margin_bottom': self.margin_bottom, - 'margin_left': self.margin_left, - 'margin_right': self.margin_right, - 'margin_top': self.margin_top, - 'orientation': self.orientation, - } - return kwargs |