I think the solution is to work with "using" and to call db_for_read
router function in that.
On Sep 22, 4:06 pm, Sudhakar wrote:
> My router.py file is as below:-
>
> class shard_data:
> id = 0
>
> class AppRouter(object):
> """A router to control all database operations on models in
>
My router.py file is as below:-
class shard_data:
id = 0
class AppRouter(object):
"""A router to control all database operations on models in
that belongs to a app in APPS_WITH_DB"""
def db_for_read(self, model, **hints):
"Point all operations on myapp models to 'other'"
My router.py file is as below:-
class shard_data:
id = 0
class AppRouter(object):
"""A router to control all database operations on models in
that belongs to a app in APPS_WITH_DB"""
def db_for_read(self, model, **hints):
"Point all operations on myapp models to 'other'"
3 matches
Mail list logo