blob: eeb4cdbefa67cfefe45a929265f7456582c26588 (
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'
return None
|