The "migrating models on every database issue" can be solved easily by 
creating a command that calls the specified one using `call_command` and 
passing the correct `db` kwarg to the underlying one.

Say you have installed South and want to call the `migrate` with two 
underlying dbs.

./manage.py multidbwrappercmd migrate --all

Would internally do:

call_command('migrate', all=true, db='db1')
call_command('migrate', all=true, db='db2')

Le mardi 22 mai 2012 09:50:49 UTC-4, Bernardo Pires a écrit :
>
> Hello guys,
>
> Have you guys taken a look at  
> https://github.com/phugoid/django-simple-multitenant?
> I'm not a big fan of one database per tenant as I think this can get quite 
> out of hand very easily (migrating models on every single database). The 
> app linked above simply adds a foreign key to all models needed, so that 
> you can infer which Tenant you are talking about. I've been thinking of 
> using it on my next project. Any suggestions? Thanks in advance.
>
> Bernardo Pires
>
> Am Mittwoch, 9. Mai 2012 05:02:45 UTC+2 schrieb Alec Taylor:
>>
>> Dear Django-developers, 
>>
>> I've been using Django for a few months now, and recently—for 
>> different projects—started using the web-framework: web2py[1], and the 
>> Django project: mezzanine[2]. 
>>
>> Both advertise as being multi-tenant solutions[3][4]. 
>>
>> Would it be possible to extend Django to meet this use-case? — Or have 
>> I overlooked something and is this possible already? 
>>
>> Thanks for all information, 
>>
>> Alec Taylor 
>>
>> [1] http://www.web2py.com/ 
>> [2] http://mezzanine.jupo.org/ 
>> [3] https://groups.google.com/forum/#!topic/mezzanine-users/4XPe5MaD4Fw 
>> [4] PyCon 2012 talk: http://youtu.be/M5IPlMe83yI?t=5m32s 
>> http://dl.dropbox.com/u/18065445/Slides/PySFTalkSlides.pdf (slide42, 
>> see yt for more info) 
>>
>

-- 
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/-/ZIuA2r4QOCsJ.
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