Re: Multitenant in Django

2011-09-12 Thread Cal Leeming [Simplicity Media Ltd]
This is similar to something we have used for one of our clients, except we used multihost.py :) +1 for this approach On Sun, Sep 11, 2011 at 3:49 PM, Alessandro Pasotti wrote: > 2011/9/9 sjtirtha > >> But I cannot set the SITE_ID in the settings.py right? >> Because if one user set the SITE_ID

Re: Multitenant in Django

2011-09-11 Thread Alessandro Pasotti
2011/9/9 sjtirtha > But I cannot set the SITE_ID in the settings.py right? > Because if one user set the SITE_ID = 1, then parallel another user > can set the SITE_ID = 2. > Because we only have one instance. > Right, but AFAIK if you don't use threads you shouldn't have any problem. We have b

Re: Multitenant in Django

2011-09-11 Thread yanliang tang
在什么地方举行呢? -- 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 django-users+unsubscr...@googlegroups.com. For more options, visit this

Re: Multitenant in Django

2011-09-09 Thread sjtirtha
But I cannot set the SITE_ID in the settings.py right? Because if one user set the SITE_ID = 1, then parallel another user can set the SITE_ID = 2. Because we only have one instance. On the other hand I still want to use SITE_ID from the settings.py, because using this I can call the models method

Re: Multitenant in Django

2011-09-09 Thread Eric Hutchinson
you could write a middleware that looks at the request.META and inserts the correct id into the request? you won't be able to access it like you would with the settings.SITE_ID, but it should be a start On Sep 9, 5:02 am, sjtirtha wrote: > Hi, > > I'm looking for the best solution to have a mult