From 093f9bddf93dd20bd0664f3330e4a550a9905de9 Mon Sep 17 00:00:00 2001 From: Thomas Steen Rasmussen Date: Tue, 31 May 2016 00:00:57 +0200 Subject: [PATCH] .invoice.pdf --- shop/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shop/views.py b/shop/views.py index 93f50e22..b680f88f 100644 --- a/shop/views.py +++ b/shop/views.py @@ -273,7 +273,7 @@ class DownloadInvoiceView(LoginRequiredMixin, EnsureUserOwnsOrderMixin, EnsurePa def get(self, request, *args, **kwargs): response = HttpResponse(content_type='application/pdf') response['Content-Disposition'] = 'attachment; filename="%s"' % self.get_object().invoice.filename - response.write(self.get_object().pdf.read()) + response.write(self.get_object().invoice.pdf.read()) return response #################################################################################