Merge pull request #217 from tpyo/master

Add database router allow_migrate() for Django 1.7
This commit is contained in:
Bernardo Pires 2015-01-05 20:10:14 +01:00
commit 492641bb6f
1 changed files with 5 additions and 1 deletions

View File

@ -7,7 +7,7 @@ class TenantSyncRouter(object):
depending if we are syncing the shared apps or the tenant apps.
"""
def allow_syncdb(self, db, model):
def allow_migrate(self, db, model):
# the imports below need to be done here else django <1.5 goes crazy
# https://code.djangoproject.com/ticket/20704
from django.db import connection
@ -21,3 +21,7 @@ class TenantSyncRouter(object):
return False
return None
def allow_syncdb(self, db, model):
# allow_syncdb was changed to allow_migrate in django 1.7
return self.allow_migrate(db, model)