Sunday, 25 August 2013

Passing variables to css file in django

Passing variables to css file in django

Is it possible to pass variables in css files, like in html file. Example:
In views.py:
def home(request):
bgcolor = "#999"
...
...
In the css file:
body {
background-color : {{bgcolor}};
}
If yes, can you please guide me how to achieve this? I would really
appreciate. Thank you!

No comments:

Post a Comment