Hi,
I have a pecuilar requirement and was wondering the best possible
solution for it.
My site powered by django will run a on at least a few hundred
different domain names(something like google apps). I am thinking of
using Django's site framework to handle the database. Few properties
in my settings file (template directories,site_id,email,logoimage  for
example) need to change with the domain name.
Since most of the clients will sign up automatically on the site i
will move these configurable settings to the database.
I need a solution for loading these settings per request based on the
domain name. I do not want to spawn separate processes for every
hostname as that would be a waste of memory for clients with very few
hits.
I was thinking of writing a request middleware and updating the global
settings on every request picking them from my cache.However I am not
sure of the correct approach to do this.
I wanted to know if a django process is threaded ( in which case
updating the global settings will not work) or does one process serve
only one request at a time (in which case it will)?
Any other approaches to the problem will be also welcome.
Note: Editing django and the apps i am using to pick these settings
directly from memcache instead of django.conf.settings is the last
option if nothing else comes up.
Thanks,
Shitiz Bansal

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

Reply via email to