I would like to create a virtual hosting style solution which allows:

 * New sites to be created through-the-web.
 * Multiple domains to be assigned to each site.
 * Each site to have separate media and templates folders.

The requirements are not too difficult, I can implement most of this on
top of the standard sites framework without great modification. One
thing I do need to do is modify settings.SITE_ID at runtime. The domain
name is found in request.META["HTTP_HOST"] and the SITE_ID is looked-up
from that. I've created a trivially simple middleware to do this and it
works, but the settings documentation forbids runtime modification.

 * Why should settings be left unchanged? (I have some guesses)
 * Is there a way around this problem?
 * Anyone have any other suggested designs for this solution?

I can create my own version of the sites framework, which doesn't use
settings.SITE_ID, but it would be nice to reuse what's there,
especially as other parts of Django link to the framework.


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to