diff options
| author | Claude Paroz <claude@2xlibre.net> | 2014-06-20 13:52:36 +0200 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2014-06-20 13:55:12 +0200 |
| commit | 90058942338528a9e6b0995c8cd0f357ca0ed900 (patch) | |
| tree | 21edcf7b8e88603895cb9b66c4850c36f72f683e | |
| parent | 44b00af9bc3e6e8a561103aa5ca564995ca3c594 (diff) | |
[1.7.x] Swapped placeholders in [sql]migrate command error
Backport of b67e9ed8c9 from master.
| -rw-r--r-- | django/core/management/commands/migrate.py | 6 | ||||
| -rw-r--r-- | django/core/management/commands/sqlmigrate.py | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/django/core/management/commands/migrate.py b/django/core/management/commands/migrate.py index 6432a4c3f7..9cdd804081 100644 --- a/django/core/management/commands/migrate.py +++ b/django/core/management/commands/migrate.py @@ -87,9 +87,11 @@ class Command(BaseCommand): try: migration = executor.loader.get_migration_by_prefix(app_label, migration_name) except AmbiguityError: - raise CommandError("More than one migration matches '%s' in app '%s'. Please be more specific." % (app_label, migration_name)) + raise CommandError("More than one migration matches '%s' in app '%s'. Please be more specific." % ( + migration_name, app_label)) except KeyError: - raise CommandError("Cannot find a migration matching '%s' from app '%s'." % (app_label, migration_name)) + raise CommandError("Cannot find a migration matching '%s' from app '%s'." % ( + migration_name, app_label)) targets = [(app_label, migration.name)] target_app_labels_only = False elif len(args) == 1: diff --git a/django/core/management/commands/sqlmigrate.py b/django/core/management/commands/sqlmigrate.py index e8ced69c21..5652d082ea 100644 --- a/django/core/management/commands/sqlmigrate.py +++ b/django/core/management/commands/sqlmigrate.py @@ -39,9 +39,11 @@ class Command(BaseCommand): try: migration = executor.loader.get_migration_by_prefix(app_label, migration_name) except AmbiguityError: - raise CommandError("More than one migration matches '%s' in app '%s'. Please be more specific." % (app_label, migration_name)) + raise CommandError("More than one migration matches '%s' in app '%s'. Please be more specific." % ( + migration_name, app_label)) except KeyError: - raise CommandError("Cannot find a migration matching '%s' from app '%s'. Is it in INSTALLED_APPS?" % (app_label, migration_name)) + raise CommandError("Cannot find a migration matching '%s' from app '%s'. Is it in INSTALLED_APPS?" % ( + migration_name, app_label)) targets = [(app_label, migration.name)] # Make a plan that represents just the requested migrations and show SQL |
