multitenant: sync syncdb with upstream
This commit is contained in:
parent
964ebb51d3
commit
e75d051689
|
@ -7,9 +7,9 @@ from django.core.management.base import CommandError
|
|||
from django.conf import settings
|
||||
from tenant_schemas.utils import django_is_in_test_mode
|
||||
|
||||
try:
|
||||
if 'south' in settings.INSTALLED_APPS:
|
||||
from south.management.commands import syncdb
|
||||
except ImportError:
|
||||
else:
|
||||
from django.core.management.commands import syncdb
|
||||
|
||||
|
||||
|
@ -19,7 +19,7 @@ class Command(syncdb.Command):
|
|||
database = options.get('database', 'default')
|
||||
if (settings.DATABASES[database]['ENGINE'] == 'tenant_schemas.postgresql_backend' and not
|
||||
django_is_in_test_mode()):
|
||||
raise CommandError("syncdb has been disabled, for database '{}'. "
|
||||
raise CommandError("syncdb has been disabled, for database '{0}'. "
|
||||
"Use sync_schemas instead. Please read the "
|
||||
"documentation if you don't know why "
|
||||
"you shouldn't call syncdb directly!".format(database))
|
||||
|
|
Reference in New Issue