0

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.

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.