From b67e9ed8c991830acdc12f2b97f92769719556a7 Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Fri, 20 Jun 2014 13:52:36 +0200 Subject: [PATCH] Swapped placeholders in [sql]migrate command error --- django/core/management/commands/migrate.py | 6 ++++-- 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 4149cbdc3a..508dd8e0d9 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 options['app_label']: diff --git a/django/core/management/commands/sqlmigrate.py b/django/core/management/commands/sqlmigrate.py index eb43cec351..e2e421d526 100644 --- a/django/core/management/commands/sqlmigrate.py +++ b/django/core/management/commands/sqlmigrate.py @@ -35,9 +35,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