Re: One Django instance, hundreds of websites

2011-01-25 Thread Rohan Jain
I am also trying to achieve something highly similar to this but in a dilemma, for how to proceed. I have written a post about this: http://www.rohanjain.in/blog/hosting-multiple-sites-with-same-django-project/. Is there any existing big project following a similar concept? -- You received thi

Re: One Django instance, hundreds of websites

2011-01-25 Thread Graham Dumpleton
On Wednesday, January 26, 2011 2:27:31 AM UTC+11, Russell Keith-Magee wrote: > > 2011/1/25 Łukasz Rekucki : > > On 25 January 2011 16:15, Russell Keith-Magee > wrote: > >> > >> For the next couple of weeks the core developers will be a little busy > >> finalizing the 1.4 release; > > > > That i

Re: One Django instance, hundreds of websites

2011-01-25 Thread James Bennett
On Tue, Jan 25, 2011 at 3:45 PM, Graham Dumpleton wrote: > Since the 'futures' module is only a part of Python 3.2, that must mean you > are using that and thus have ported Django to Python 3 already. When can we > expect that then. ;-) So, here's what happened. You all may remember that some ti

Re: One Django instance, hundreds of websites

2011-01-25 Thread Graham Dumpleton
On Wednesday, January 26, 2011 2:27:31 AM UTC+11, Russell Keith-Magee wrote: > > 2011/1/25 Łukasz Rekucki : > > On 25 January 2011 16:15, Russell Keith-Magee > wrote: > >> > >> For the next couple of weeks the core developers will be a little busy > >> finalizing the 1.4 release; > > > > That i

annotating fields with null=True

2011-01-25 Thread Sergiy Kuzmenko
Hi there! Annotating a nullable foreign field with Count seems to always return the count of null values as zero (at least in MySQL environment). A quick look into this problem reveals that the corresponding SQL clause is generated as `count()` [1]. This causes to exclude null values from annotati

Re: contrib.sites and multitenancy

2011-01-25 Thread Jari Pennanen
This is the stuff I've come up on first try few days ago: Here is my current cache implementation: https://gist.github.com/795135 And here is my middleware: https://gist.github.com/795138 -- You received this message because you are subscribed to the Google Groups "Django developers" group. To

Re: contrib.sites and multitenancy

2011-01-25 Thread Jari Pennanen
Hi! I've started another thread since I was oblivious about this one. One thing I noticed in my early experimentation is that caching Site objects is a bit of waste. I don't know what is the overhead for caching Site objects compared to just IDs but I suppose when we get to hunderds of sites and

Re: One Django instance, hundreds of websites

2011-01-25 Thread Russell Keith-Magee
2011/1/25 Łukasz Rekucki : > On 25 January 2011 16:15, Russell Keith-Magee wrote: >> >> For the next couple of weeks the core developers will be a little busy >> finalizing the 1.4 release; > > That is obviously supposed to be 1.3 ;) Erm... ahh... No... I'm writing from the FUTURE!!! The flying c

Re: One Django instance, hundreds of websites

2011-01-25 Thread Łukasz Rekucki
On 25 January 2011 16:15, Russell Keith-Magee wrote: > > For the next couple of weeks the core developers will be a little busy > finalizing the 1.4 release; That is obviously supposed to be 1.3 ;) -- Łukasz Rekucki -- You received this message because you are subscribed to the Google Groups

Re: One Django instance, hundreds of websites

2011-01-25 Thread Russell Keith-Magee
On Tue, Jan 25, 2011 at 10:56 PM, Jari Pennanen wrote: > Hi! > > I'm on a monumental task here, I've decided to get one Django instance > running hundreds of websites. > > I've run in to couple of shortcomings with django: > > 1. Global SITE_ID does not work since some requests belong to > differe

One Django instance, hundreds of websites

2011-01-25 Thread Jari Pennanen
Hi! I'm on a monumental task here, I've decided to get one Django instance running hundreds of websites. I've run in to couple of shortcomings with django: 1. Global SITE_ID does not work since some requests belong to different site. I've created middleware that adds request.site_id based on hos