On Wed, May 21, 2008 at 5:58 PM, sebey <[EMAIL PROTECTED]> wrote:
> I know css does not not have any variables but I was thinking that
> python/django could look though the css file and have
> background-color:{{insert python varible here}}

Django's templating is not restricted to HTML only. You can do
something like this in the view:

    render_to_response('style.css', {'bgcol': '#fff', })

Then in style.css you can have:

    background-color: {{ bgcol }}

You might need to set the correct mime type when serving non-html
files. Please check the docs.

Ronny

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to