mirror of
https://github.com/django/django.git
synced 2024-12-25 10:35:48 +00:00
Fix "OK" alignment in migrate output
This commit is contained in:
parent
52643a69e3
commit
d5ca169334
@ -116,15 +116,15 @@ class Command(BaseCommand):
|
||||
def migration_progress_callback(self, action, migration):
|
||||
if self.verbosity >= 1:
|
||||
if action == "apply_start":
|
||||
self.stdout.write(" Applying %s... " % migration)
|
||||
self.stdout.write(" Applying %s..." % migration, ending="")
|
||||
self.stdout.flush()
|
||||
elif action == "apply_success":
|
||||
self.stdout.write(" OK\n")
|
||||
self.stdout.write(self.style.MIGRATE_SUCCESS(" OK"))
|
||||
elif action == "unapply_start":
|
||||
self.stdout.write(" Unapplying %s... " % migration)
|
||||
self.stdout.write(" Unapplying %s..." % migration, ending="")
|
||||
self.stdout.flush()
|
||||
elif action == "unapply_success":
|
||||
self.stdout.write(" OK\n")
|
||||
self.stdout.write(self.style.MIGRATE_SUCCESS(" OK"))
|
||||
|
||||
def sync_apps(self, connection, apps):
|
||||
"Runs the old syncdb-style operation on a list of apps."
|
||||
|
@ -88,6 +88,8 @@ PALETTES = {
|
||||
'HTTP_SERVER_ERROR': {},
|
||||
'MIGRATE_HEADING': {},
|
||||
'MIGRATE_LABEL': {},
|
||||
'MIGRATE_SUCCESS': {},
|
||||
'MIGRATE_FAILURE': {},
|
||||
},
|
||||
DARK_PALETTE: {
|
||||
'ERROR': { 'fg': 'red', 'opts': ('bold',) },
|
||||
@ -105,6 +107,8 @@ PALETTES = {
|
||||
'HTTP_SERVER_ERROR': { 'fg': 'magenta', 'opts': ('bold',) },
|
||||
'MIGRATE_HEADING': { 'fg': 'cyan', 'opts': ('bold',) },
|
||||
'MIGRATE_LABEL': { 'opts': ('bold',) },
|
||||
'MIGRATE_SUCCESS': { 'fg': 'green', 'opts': ('bold',) },
|
||||
'MIGRATE_FAILURE': { 'fg': 'red', 'opts': ('bold',) },
|
||||
},
|
||||
LIGHT_PALETTE: {
|
||||
'ERROR': { 'fg': 'red', 'opts': ('bold',) },
|
||||
@ -122,6 +126,8 @@ PALETTES = {
|
||||
'HTTP_SERVER_ERROR': { 'fg': 'magenta', 'opts': ('bold',) },
|
||||
'MIGRATE_HEADING': { 'fg': 'cyan', 'opts': ('bold',) },
|
||||
'MIGRATE_LABEL': { 'opts': ('bold',) },
|
||||
'MIGRATE_SUCCESS': { 'fg': 'green', 'opts': ('bold',) },
|
||||
'MIGRATE_FAILURE': { 'fg': 'red', 'opts': ('bold',) },
|
||||
}
|
||||
}
|
||||
DEFAULT_PALETTE = DARK_PALETTE
|
||||
|
Loading…
Reference in New Issue
Block a user