-
-
Notifications
You must be signed in to change notification settings - Fork 696
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
Is it possible that weasyprint doesn't correctly load css files, specified in the html file, inside a docker container? #1528
Comments
Hello! The best way to know what’s going on is to use And if you use Django with WeasyPrint, you can try Django-WeasyPrint! |
@danielmoessner Did you find the time to try the |
Sorry, I haven't tried it again yet. Not sure when I'll find the time, as for the moment it works with CSS(). I'll close this issue for now and reopen as soon as I find out more. |
@liZe thanks for your insight. With logging i was ablel to finally see why weasyprint wasn't applying my tailwindcss stylesheet to my pdf output file. I have attached the log file incase you have any solution steps to offer. Thanks |
Hi @ethernalarts, According to your logs, the main problems are:
(The warnings are quite self-explanatory, aren’t they?) |
Hello @liZe , Thank you for your prompt response and links. Yes, i guess they are quite self-explanatory. The volume of errors can be overwhelming at times. I'll check out your links and get back to you. Once again thank you. |
Using weasyprint 53.4 inside a django project
I've had the following code, which failed in production inside a docker container:
html
python:
BACKEND_URL looks like https://api.example.com
and the styles were applied correctly locally in development mode, but it all failed once i've put it inside a docker container and deployed.
Now this always works:
Might there be a reason why the css doesn't load inside a docker container?
I've thought it might have to do with ALLOWED_HOSTS in django, because weasyprint might make a request to the application itself to get the css file, but that doesn't seem to be the case. I don't know how weasyprint loads the css files within the html file.
I'm curious on what's going on here.
The text was updated successfully, but these errors were encountered: