Russ,
Your gut feeling confirms my suspicion.
Changing the lines to the following fixes my problem:
db = model_instance._state.db
if db is None:
db = router.db_for_write(model_instance.__class__,
instance=model_instance)
qs =
On Tue, Jun 15, 2010 at 9:11 PM, johan de taeye
wrote:
>
>> You can't do this with a router; as you've noted, the router doesn't
>> have any information about the request in which it is being used.
>>
>> However, you could do it by manually requesting your database
>>
> You can't do this with a router; as you've noted, the router doesn't
> have any information about the request in which it is being used.
>
> However, you could do it by manually requesting your database
> connection whenever you use the database. For example:
>
>
On Tue, Jun 15, 2010 at 7:12 PM, johan de taeye
wrote:
> Hello,
>
> In my application a number of databases are configured with identical
> schemas.
> From a dropdown box on the screen, the user selects the database he/
> she wants to work with. The selected database is
I didn't work with multidb but I think it is possible anyway... try it using
additional middleware... for example.. change dynamically db settings...
etc
On Tue, Jun 15, 2010 at 2:12 PM, johan de taeye wrote:
> Hello,
>
> In my application a number of databases are
Hello,
In my application a number of databases are configured with identical
schemas.
>From a dropdown box on the screen, the user selects the database he/
she wants to work with. The selected database is stored on the
cookie.
An object with the same primary key can be created in each schema by
6 matches
Mail list logo