summaryrefslogtreecommitdiff
path: root/tests/migrations/routers.py
blob: 9857363937f91eaca4d03b16a38f098ee5efedab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
class EmptyRouter(object):
    pass


class TestRouter(object):
    def allow_migrate(self, db, app_label, model_name=None, **hints):
        """
        The Tribble model should be the only one to appear in the 'other' db.
        """
        if model_name == 'tribble':
            return db == 'other'
        elif db == 'other':
            return False