How to Link Attributes of a StyleSheet to fields in a Database

They have: 2 posts

Joined: Jun 2010

Hi.

We run a social networking site for teams and groups. And basically we have 42 websites running the mod 'Django v0.9. The sites are skinned up personally for organizations and sporting clubs. When we create a 'club' and that club has 'teams' in it, the clubs are assigned their own 'Club Colors' which changes the colors of 2 headings ( it used to do more but doesn't now, due to advancing of the site ).

In our Repository, we have all the sites and their subfolders. and all the subfolders in each of the sites contain the same files, so we are gradually working to reorganize our repository and have the common files to be shared amongst all the sites to implement changes alot easier. because if we want to implement changes at this current time, we have to do it on all 42 sites. and yeh - we dont want to.

So basically Each site has their the common html files and others different, but even the common files, have SOME TEXT that is different. And each site has their own stylesheet, aswell as a common stylesheet we share among all the sites.

Now we got into 'skinning up' sites for people where we basically colorize the site to look like the organizations website.

We're now at a stage where, we want all the sites to run of similar files to implement changes alot easier. And by doing that, i want to have the Stylesheets call for the 'Club Colours' so i can set, 'all the text' by Club Colour 1 and all the borders by Club colour 2. and the background by Club Colour 3 etc. I know i can obviously pull this information if i put it in the html files. But i don't know how to pull fields from a database, into a .css file.

Please help!
Ben

They have: 2 posts

Joined: Jun 2010

now upgrading Django . . Anyone? with any knowledge please?

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.