增加数据库路由

This commit is contained in:
virusdefender 2015-08-17 16:31:42 +08:00
parent 07349ba6e2
commit b4f45a619f

View File

@ -18,13 +18,6 @@ class DBRouter(object):
def allow_migrate(self, db, app_label, model=None, **hints): def allow_migrate(self, db, app_label, model=None, **hints):
if app_label == "submission": if app_label == "submission":
if db == "submission": if db == "submission":
r = True return db == app_label
else:
r = False
else: else:
if db == "default": return db == "default"
r = True
else:
r = False
print db, app_label, r
return r