I played around a bit with using this, and got something quite workable 
going on.

https://bitbucket.org/schinckel/django-multi-schema

It's really only an exploration, but does show that it can be done.

The problems actually really only got hard once you factor south into the 
equation.

There are a few little hacky things that needed to be done (like setting 
the search path),
and it probably only works on postgres, but as a concept I still feel like 
it has legs.

There are also a couple of other approaches out there, too.

Matt.


On Thursday, May 24, 2012 3:36:58 AM UTC+9:30, Anssi Kääriäinen wrote:
>
> On May 23, 3:16 am, Anthony Briggs <anthony.bri...@gmail.com> wrote: 
> > I did a similar thing for some of my projects - the problem is that you 
> > can't reuse any non-multitenant apps without hacking the multitenant 
> stuff 
> > in first, ie. it's a bit of a hack, plus it makes things harder to 
> maintain 
> > going forwards. 
> > 
> > One database per tenant should (in theory) make life much simpler. 
>
> One schema per tenant would also be pretty good. It makes it much 
> easier to do cross-db queries, or use a public schema for common 
> stuff. This should be doable if/when the support for database schemas 
> is included. I got pretty far in that feature in ticket #6148, but it 
> turns out to be pretty complex to support introspection and creation 
> on all the databases for both production and testing. So, it remains 
> to see if we want to add all that complexity. Still, multitenancy 
> support seems to be one use case where the database schemas support 
> could be very useful in Django. 
>
>  - Anssi

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

Reply via email to