2017-01-19 15:39:46 +08:00
|
|
|
class EmptyRouter:
|
2016-09-02 04:19:29 +08:00
|
|
|
pass
|
|
|
|
|
|
|
|
|
2017-01-19 15:39:46 +08:00
|
|
|
class TestRouter:
|
2016-01-25 08:23:38 +08:00
|
|
|
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
|