summaryrefslogtreecommitdiff
path: root/app/income/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/income/views.py')
-rw-r--r--app/income/views.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/app/income/views.py b/app/income/views.py
index fc22c0d..1c34068 100644
--- a/app/income/views.py
+++ b/app/income/views.py
@@ -4,7 +4,7 @@ from django.template.loader import render_to_string
from django.http import HttpResponse
from django.conf import settings
-from weasyprint import HTML, CSS
+#from weasyprint import HTML, CSS
from .models import Invoice, InvoiceItem
@@ -45,8 +45,9 @@ class DownloadMonthlyInvoiceView(MonthlyInvoiceView):
'invoice_number': self.object.id+23
}
t = render_to_string('details/invoice.html', c).encode('utf-8')
- html = HTML(string=t, base_url=self.request.build_absolute_uri())
- pdf = html.write_pdf(stylesheets=[CSS(settings.MEDIA_ROOT + '/pdf_gen.css')], presentational_hints=True)
- response = HttpResponse(pdf, content_type='application/pdf')
- response['Content-Disposition'] = 'inline; filename="invoice.pdf"'
+ #html = HTML(string=t, base_url=self.request.build_absolute_uri())
+ #pdf = html.write_pdf(stylesheets=[CSS(settings.MEDIA_ROOT + '/pdf_gen.css')], presentational_hints=True)
+ #response = HttpResponse(pdf, content_type='application/pdf')
+ #response['Content-Disposition'] = 'inline; filename="invoice.pdf"'
+ response = HttpResponse('', content_type='application/pdf')
return response