if model._meta.app_label == 'myapp' and model._meta.object_name ==
'ModelInDatabase2Name':
That is - instead of just checking the app, check the app and the
model name. Install the router, and any query involving
ModelInDatabase2Name will be directed to the 'other' database.
It would be help
Russ Magee,
Thanks for the quick response, your message explained what I was not
understanding and I was able to get my code working.
:)
Gregory Roby
On May 13, 10:44 am, Russell Keith-Magee
wrote:
> On Thu, May 13, 2010 at 10:27 PM, GRoby wrote:
> > Hello,
>
> > I am using Django 1.2 RC 1
On Thu, May 13, 2010 at 10:27 PM, GRoby wrote:
> Hello,
>
> I am using Django 1.2 RC 1 and have setup multiple databases. I have
> everything working if I manually specify .using, for example:
>
> SomeObjects = ModelInDefaultDatabase.objects.all() #This Works
>
> SomeObjects = ModelInDatabase2Na
Hello,
I am using Django 1.2 RC 1 and have setup multiple databases. I have
everything working if I manually specify .using, for example:
SomeObjects = ModelInDefaultDatabase.objects.all() #This Works
SomeObjects = ModelInDatabase2Name.objects.using('Database2').all()
#This also Works
How ca
4 matches
Mail list logo