blob: 3d9c330315e252db8d62c577a0743cf7f2afdad7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
class MyDatabaseRouter(object):
"""
A router to manage database operations in the myauthentication app.
"""
def db_for_read(self, model, **hints):
"""
Point all read operations on myauthentication app to spoken
database.
"""
if model._meta.app_label == 'myauthentication':
return 'spoken_tutorial'
return None
|