.invoice.pdf
This commit is contained in:
parent
7936a931b1
commit
093f9bddf9
|
@ -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
|
||||
|
||||
#################################################################################
|
||||
|
|
Loading…
Reference in a new issue