mirror of
https://github.com/QingdaoU/OnlineJudge.git
synced 2025-01-20 11:30:11 +00:00
增加数据库路由
This commit is contained in:
parent
07349ba6e2
commit
b4f45a619f
@ -18,13 +18,6 @@ class DBRouter(object):
|
||||
def allow_migrate(self, db, app_label, model=None, **hints):
|
||||
if app_label == "submission":
|
||||
if db == "submission":
|
||||
r = True
|
||||
else:
|
||||
r = False
|
||||
return db == app_label
|
||||
else:
|
||||
if db == "default":
|
||||
r = True
|
||||
else:
|
||||
r = False
|
||||
print db, app_label, r
|
||||
return r
|
||||
return db == "default"
|
Loading…
x
Reference in New Issue
Block a user