How To Generate PDF Files Dynamically With Django - Django Wednesdays #17

Описание к видео How To Generate PDF Files Dynamically With Django - Django Wednesdays #17

In this video we'll use reportlab to automatically generate a pdf file of our venue list on the fly dynamically with Django and Python.


Generating pdf files is super useful in any app, with Django it's pretty easy. We'll be using a library called Reportlab that we'll have to install, but it's pretty quick and easy to use.


Users of our site will be able to click a link and download a pdf file with a list off all our venues, generated dynamically. So if we add another venue to the database, it will get added to the pdf file automatically.



#django #codemy #JohnElder

Timecodes
0:00​​ - Introduction
1:50 - Install Reportlab PDF Library
2:22 - Import Reportlab Items
3:50 - Create PDF URL in urls.py
4:09 - Create PDF Link in Navbar
4:35 - Create venue_pdf View in views.py
6:29 - Add Lines Of Text To PDF
7:23 - Draw PDF
7:44 - Return FileResponse
9:20 - Add Venue List To PDF
11:42 - Test It Out
12:25 - Check Out ReportLab Guide
13:08 - Conclusion

Комментарии

Информация по комментариям в разработке