Projet

Général

Profil

« Précédent | Suivant » 

Révision e75d0516

Ajouté par Thomas Noël il y a plus de 9 ans

multitenant: sync syncdb with upstream

Voir les différences:

entrouvert/djommon/multitenant/management/commands/syncdb.py
7 7
from django.conf import settings
8 8
from tenant_schemas.utils import django_is_in_test_mode
9 9

  
10
try:
10
if 'south' in settings.INSTALLED_APPS:
11 11
    from south.management.commands import syncdb
12
except ImportError:
12
else:
13 13
    from django.core.management.commands import syncdb
14 14

  
15 15

  
......
19 19
        database = options.get('database', 'default')
20 20
        if (settings.DATABASES[database]['ENGINE'] == 'tenant_schemas.postgresql_backend' and not
21 21
                django_is_in_test_mode()):
22
            raise CommandError("syncdb has been disabled, for database '{}'. "
22
            raise CommandError("syncdb has been disabled, for database '{0}'. "
23 23
                               "Use sync_schemas instead. Please read the "
24 24
                               "documentation if you don't know why "
25 25
                               "you shouldn't call syncdb directly!".format(database))

Formats disponibles : Unified diff