March 2020
Intermediate to advanced
608 pages
17h 17m
English
Django views allow you to create much more than just HTML pages. You can create files of any type. For example, in the Exposing settings in JavaScript recipe in Chapter 4, Templates and JavaScript, our view provides its output as a JavaScript file rather than HTML. You can also create PDF documents for invoices, tickets, receipts, booking confirmations, and so on. In this recipe, we will show you how to generate handouts to print for each idea from the database. We are going to use the WeasyPrint library to make PDF documents out of HTML templates.