Skip to content

Update Render_to_PDF_in_Django.md #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions all/Render_to_PDF_in_Django.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,18 @@ A guide to using an HTML template to create a PDF via a `render_to_pdf` utility
return HttpResponse("Not found")
```

urls.py


```
from django.urls import path
from .views import GeneratePdf, GeneratePDF

urlpatterns = [
path('generate-pdf/', GeneratePdf.as_view(), name='generate_pdf'),
path('generate-pdf-download/', GeneratePDF.as_view(), name='generate_pdf_download'),
]
```

### Watch [here](https://www.codingforentrepreneurs.com/projects/render-pdf/)
<iframe width="560" height="315" src="https://www.youtube.com/embed/B7EIK9yVtGY" frameborder="0" allowfullscreen></iframe>