I’m looking into hosting my Python/Django application on the App Platform and I was wondering if WeasyPrint is supported? It seems to require some further installation besides the Python Package installation.
Any experiences or alternative recommendations to create PDF’s with Django? Thanks!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Enter your email to get $200 in credit for your first 60 days with DigitalOcean.
New accounts only. By submitting your email you agree to our Privacy Policy.
Hello! WeasyPrint can certainly be used with App Platform. I tried to create an instance with a clone of WeasyPrint, however, I wasn’t able to detect the service component.
One simple way to get around that however is to use a docker file.
I found one here: https://gitlab.com/jamesvl/weasyprint-docker-alpine
I created an app with the following app spec:
Hello @al3xs
Looking at the official documentation it shouldn’t be e problem to deploy WeasyPrint on the App Platform.
https://doc.courtbouillon.org/weasyprint/stable/first_steps.html#linux
You can try using Dockerfile:
https://www.digitalocean.com/community/tutorials/docker-explained-how-to-containerize-python-web-applications
Regards