Reputation: 25559
I'm using django method Context.render() to render my template to actual html code, and store the code into a file so that I can convert it into pdf, and I have external css file that stores all the layout. However, when the file is rendered, the css codes are not expanded as they are, but stay as "classes" and "ids". Is there a way that I can render the actual css styles as well? Thanks.
Upvotes: 0
Views: 111
Reputation: 22984
The verb "render" can be confusing, but it is basically sending your output to the browser. If you want to marry your styles to your HTML, you'll need to declare them there, or write something custom to parse the CSS and add the rules inline when rendering.
Upvotes: 1