CSS Templating system for Django / Python?

↘锁芯ラ 提交于 2019-12-05 16:52:35

The Django templating system can be used for any text you like. It's used for HTML most of the time, but it could also be used to create CSS. The CSS reference in your HTML can be to a dynamic URL instead of to a static file, and the view function can create whatever context you like, then a .css template file can create your CSS.

If you have only a few different CSS possibilities, then you may be better served by creating them as static files, and using the HTML template to select the CSS file you want by writing a different CSS reference depending you your conditions.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!