B
B
bituke2020-09-15 11:00:05
Django
bituke, 2020-09-15 11:00:05

How to use django template engine in css?

The crux of the issue is above.
I need to change the style of the text depending on the function, but in css it can not be done like in html.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Kitaev, 2020-09-15
@bituke

Django template engine is the most common text template engine, which does not depend on what you are trying to apply it to - HTML, py code, CSS, it doesn’t matter.
Another thing is that it is customary to transfer CSS as a separate file and cache it on the browser side. If you stir up a multi-kilobyte file every request, then it will not only be long on the server side, but also stupid on the client side, because there will be no point in the CSS file if it changes every request.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question