summaryrefslogtreecommitdiff
path: root/testapp/myauthentication/router.py
blob: ffdf1225550a6bb2d1eaeb9192ebc742dfc7ad1a (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