22👍
✅
I had to add base_url=request.build_absolute_uri()
. So the print command looks like:
weasyprint.HTML(string=html,base_url=request.build_absolute_uri()).write_pdf(response)
0👍
Adding ‘/’ to request.build_absolute_uri() worked for me -> request.build_absolute_uri(‘/’):
weasyprint.HTML(string=html,base_url=request.build_absolute_uri('/')).write_pdf(response)
- Django 1.8: Migrations not detected after deleting migrations folder
- How to configure Apache to run ASGI in Django Channels? Is Apache even required?
- Do I need to close connection in mongodb?
Source:stackexchange.com