Monday, May 31, 2010

Django serving multiple subdomain sites -- okay to use thread-locals?

We're adapting our Django powered video site to be an open video
platform for any user to create their own "site" using subdomains (eg on one Django server instance. Each "site"
would obviously have content associated with only that site in
addition to template and navigation customizations.

Adapting the ``django-multisite`` app seems best and is working well
on our dev server:

However, a number of Django developers have expressed concerns using

I don't see any other option besides using thread-locals to
dynamically update SITE_ID per request.

What would be another way of accomplishing this goal without thread-
locals if indeed this is not best practice?

Thanks in advance for your input.


You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

No comments:

Post a Comment