In management commands of multitenant app rename variable schema_name as domain

This commit is contained in:
Benjamin Dauvergne 2014-09-18 14:26:16 +02:00
parent c370a24817
commit ce71993cc7
3 changed files with 4 additions and 4 deletions

View File

@ -145,10 +145,10 @@ class SyncCommon(BaseCommand):
self.args = args
self.options = options
if self.schema_name:
if self.domain:
if self.sync_public:
raise CommandError("schema should only be used with the --tenant switch.")
elif self.schema_name == get_public_schema_name():
elif self.domain == get_public_schema_name():
self.sync_public = True
else:
self.sync_tenant = True

View File

@ -22,7 +22,7 @@ class Command(SyncCommon):
if self.sync_public:
self.migrate_public_apps()
if self.sync_tenant:
self.migrate_tenant_apps(self.schema_name)
self.migrate_tenant_apps(self.domain)
def _set_managed_apps(self, included_apps, excluded_apps):
""" while sync_schemas works by setting which apps are managed, on south we set which apps should be ignored """

View File

@ -34,7 +34,7 @@ class Command(SyncCommon):
if self.sync_public:
self.sync_public_apps()
if self.sync_tenant:
self.sync_tenant_apps(self.schema_name)
self.sync_tenant_apps(self.domain)
# restore settings
for model in get_models(include_auto_created=True):