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

preview_player
Показать описание
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
4:09 - Create PDF Link in Navbar
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
Рекомендации по теме
Комментарии
Автор

▶️ Watch Entire Django Wednesdays Playlist ✅ Subscribe To My YouTube Channel:
▶️ See More At: ✅ Join My Facebook Group:
▶️ Get The Code

Codemycom
Автор

The Best Tutorial Django !!" Spasiba " Thank U

TRJAN
Автор

The video really helped me, thanks!
Now question:
How do I customize the style of the canvas that will receive the input?

edmondghislainmakolle
Автор

Hi
Love your work
Was trying to generate pdf files following your video, but I ran into an error and I didn't know how to fix it.
textob.textLine(Lines)
It's states " bad argument type for built-in operation" please help

cindyliveshere
Автор

Omg the timing of this video.... thanks!

eshaangupta
Автор

Your tutorials are second to none! Thank you!

christophersteffen
Автор

How to generate the name, email, etc ...in the content ?
For eg : I like [name].so here how I can actually fetch the name value form db and generate the pdf with the content?

bhuvii
Автор

I have a question please.
How do you handle a case where the file is on a server and you have to do a GET request to fetch it?

ChimaChindaDev
Автор

You make the best python tutorials.. Can I ask you what do you use for asynchronous tasks instead of redis and celery?

civismesecret
Автор

Good Morning friend! How do i make to introduce paragraphs in text of ReportLab or break lines?

RogeriodaSilvaCerqueira
Автор

How can i add hyperlink in setText in code as you define in your video ???

hemangisavsani
Автор

i always would love to watch your tutorial, i am looking forward to learn more about eCommerce website with class base views and using django allauth... plz could you start class on these eCommerce topic?

someshh
Автор

bad argument type for built-in operation :(

joseeduardoespinoza
Автор

Dear. Please tell me that this library is good for large document. because I used weasyprint to generate 1000 pages of doc which takes around 30 minutes. is this library solves my problem? Thank you

sumailmanasiya
Автор

File "C:\Python39\lib\site-packages\rest_framework\routers.py", line 242, in get_urls
routes = self.get_routes(viewset)
File "C:\Python39\lib\site-packages\rest_framework\routers.py", line 154, in get_routes
extra_actions = viewset.get_extra_actions()
AttributeError: 'function' object has no attribute 'get_extra_actions'



I ran into this issue.... Kindly help me to solve

manigandanannadurai
Автор

I am trying to generate a pdf report using data fetched from Oracle SQL database, the table is fetched as a dataframe but when I use it with reportlab the whole code just runs but no pdf is generated.
Any idea why it happens.

justrandomthings
Автор

Your videos are great, I can't wait for the next one. Can I also ask you to make a video how to update the database using the csv files we created earlier?

tappitytappity
Автор

Not sure why, but I am able to generate a pdf file when using Chrome, but not when usiing Firefox. Pretty strange!

briangreenberg
Автор

how cAN I MARGIN left on pring page using your technique

malikkamil
Автор

Sir please make video of django channels and real time online turn based games

dmitrymedvedd