diff options
| author | François Freitag <mail@franek.fr> | 2020-04-28 06:28:34 +0200 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2020-04-28 06:32:43 +0200 |
| commit | 35f89d199c94ebc72b06d5c44077401aa2eae47f (patch) | |
| tree | 30f72f237bd76962ebadf7e2fd0b66233892d476 | |
| parent | f19bb54fb1fcfdc9699c645d2de9dc99684bf5a1 (diff) | |
Merge stdout.write() calls in squashmigrations.
| -rw-r--r-- | django/core/management/commands/squashmigrations.py | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/django/core/management/commands/squashmigrations.py b/django/core/management/commands/squashmigrations.py index 9baf91c484..65da95a19b 100644 --- a/django/core/management/commands/squashmigrations.py +++ b/django/core/management/commands/squashmigrations.py @@ -188,16 +188,20 @@ class Command(BaseCommand): fh.write(writer.as_string()) if self.verbosity > 0: - self.stdout.write(self.style.MIGRATE_HEADING("Created new squashed migration %s" % writer.path)) - self.stdout.write(" You should commit this migration but leave the old ones in place;") - self.stdout.write(" the new migration will be used for new installs. Once you are sure") - self.stdout.write(" all instances of the codebase have applied the migrations you squashed,") - self.stdout.write(" you can delete them.") + self.stdout.write( + self.style.MIGRATE_HEADING('Created new squashed migration %s' % writer.path) + '\n' + ' You should commit this migration but leave the old ones in place;\n' + ' the new migration will be used for new installs. Once you are sure\n' + ' all instances of the codebase have applied the migrations you squashed,\n' + ' you can delete them.' + ) if writer.needs_manual_porting: - self.stdout.write(self.style.MIGRATE_HEADING("Manual porting required")) - self.stdout.write(" Your migrations contained functions that must be manually copied over,") - self.stdout.write(" as we could not safely copy their implementation.") - self.stdout.write(" See the comment at the top of the squashed migration for details.") + self.stdout.write( + self.style.MIGRATE_HEADING('Manual porting required') + '\n' + ' Your migrations contained functions that must be manually copied over,\n' + ' as we could not safely copy their implementation.\n' + ' See the comment at the top of the squashed migration for details.' + ) def find_migration(self, loader, app_label, name): try: |
