Browse Source

Made confirmation prompt in squashmigrations consistent with other prompts.

Prior to this change, squashmigrations would use a [yN] prompt to ask
for user confirmation. A slash was added between the yes/no options
to make it consistent with other commands that print similar prompts.
Cole D 11 months ago
parent
commit
e1431dd92e
2 changed files with 2 additions and 2 deletions
  1. 1 1
      django/core/management/commands/squashmigrations.py
  2. 1 1
      docs/topics/migrations.txt

+ 1 - 1
django/core/management/commands/squashmigrations.py

@@ -123,7 +123,7 @@ class Command(BaseCommand):
             if self.interactive:
                 answer = None
                 while not answer or answer not in "yn":
-                    answer = input("Do you wish to proceed? [yN] ")
+                    answer = input("Do you wish to proceed? [y/N] ")
                     if not answer:
                         answer = "n"
                         break

+ 1 - 1
docs/topics/migrations.txt

@@ -703,7 +703,7 @@ app label and migration name you want to squash up to, and it'll get to work:
    - 0002_some_change
    - 0003_another_change
    - 0004_undo_something
-  Do you wish to proceed? [yN] y
+  Do you wish to proceed? [y/N] y
   Optimizing...
     Optimized from 12 operations to 7 operations.
   Created new squashed migration /home/andrew/Programs/DjangoTest/test/migrations/0001_squashed_0004_undo_something.py