Using Django to white-label sites for multiple clients

410 views
Skip to first unread message

Greg Pelly

unread,
Mar 2, 2011, 3:31:00 PM3/2/11
to django...@googlegroups.com
I'm looking to "white label" a site built using Django. 

For those unfamiliar with white-labeling, we would like my site (call it "Amazing Site") to be able to be customized by sponsors A and B. Customer A provides us with their header, footer, css, and we can do *basic* re-branding, in order to present the site as "A Amazing Site" (or B's Amazing Site).

I have considered rolling my own by changing the base template. So instead of 
  {% extends "base.html" %} 
I would pass in a variable from the view:
  {% extends site-base-template %} 

Have others tried this? Are there existing strategies? Perhaps a django app that takes care of this?

Thanks,
Greg

Shawn Milochik

unread,
Mar 2, 2011, 6:35:38 PM3/2/11
to django...@googlegroups.com
One option would be to just change the value of MEDIA_ROOT in
settings.py. Or, if you're using 1.3 beta or above, STATIC_ROOT.

You could do this by having multiple settings files -- one main one
with anything that's common across all clients and one settings file
for each client which imports the main file and overrides the stuff
you care about.

Shawn

Reply all
Reply to author
Forward
0 new messages