How can I generate a report file (ODF, PDF) from a django view

I would like to generate a report file from the view & template in django. Preferred file formats were OpenOffice / ODF or PDF.

What is the best way to do this?

I want to reuse the page layout defined in the template, possibly overriding some blocks in the derived template.

Ideally, the report should be inserted into an existing template file, so I can provide a general page layout, headers and footers in the generated output format.

+6
python django pdf pdf-generation
source share
2 answers

pisa / xhtml2pdf should help you cover PDF. It even includes an example Django project.

+4
source share

Try ReportLab for PDF output:

http://www.reportlab.org/

+3
source share

All Articles