mirror of https://github.com/django/django.git
Removed redundant termcolors.
Replaced MIGRATE_SUCCESS and MIGRATE_FAILURE with SUCCESS and ERROR.
This commit is contained in:
parent
b3acdeee50
commit
c7adfe941b
|
@ -191,9 +191,9 @@ class Command(BaseCommand):
|
|||
elif action == "apply_success":
|
||||
elapsed = " (%.3fs)" % (time.time() - self.start) if compute_time else ""
|
||||
if fake:
|
||||
self.stdout.write(self.style.MIGRATE_SUCCESS(" FAKED" + elapsed))
|
||||
self.stdout.write(self.style.SUCCESS(" FAKED" + elapsed))
|
||||
else:
|
||||
self.stdout.write(self.style.MIGRATE_SUCCESS(" OK" + elapsed))
|
||||
self.stdout.write(self.style.SUCCESS(" OK" + elapsed))
|
||||
elif action == "unapply_start":
|
||||
if compute_time:
|
||||
self.start = time.time()
|
||||
|
@ -202,9 +202,9 @@ class Command(BaseCommand):
|
|||
elif action == "unapply_success":
|
||||
elapsed = " (%.3fs)" % (time.time() - self.start) if compute_time else ""
|
||||
if fake:
|
||||
self.stdout.write(self.style.MIGRATE_SUCCESS(" FAKED" + elapsed))
|
||||
self.stdout.write(self.style.SUCCESS(" FAKED" + elapsed))
|
||||
else:
|
||||
self.stdout.write(self.style.MIGRATE_SUCCESS(" OK" + elapsed))
|
||||
self.stdout.write(self.style.SUCCESS(" OK" + elapsed))
|
||||
elif action == "render_start":
|
||||
if compute_time:
|
||||
self.start = time.time()
|
||||
|
@ -212,7 +212,7 @@ class Command(BaseCommand):
|
|||
self.stdout.flush()
|
||||
elif action == "render_success":
|
||||
elapsed = " (%.3fs)" % (time.time() - self.start) if compute_time else ""
|
||||
self.stdout.write(self.style.MIGRATE_SUCCESS(" DONE" + elapsed))
|
||||
self.stdout.write(self.style.SUCCESS(" DONE" + elapsed))
|
||||
|
||||
def sync_apps(self, connection, app_labels):
|
||||
"Runs the old syncdb-style operation on a list of app_labels."
|
||||
|
|
|
@ -74,7 +74,7 @@ class Command(BaseCommand):
|
|||
shown.add(plan_node)
|
||||
# If we didn't print anything, then a small message
|
||||
if not shown:
|
||||
self.stdout.write(" (no migrations)", self.style.MIGRATE_FAILURE)
|
||||
self.stdout.write(" (no migrations)", self.style.ERROR)
|
||||
|
||||
def show_plan(self, connection):
|
||||
"""
|
||||
|
|
|
@ -92,8 +92,6 @@ PALETTES = {
|
|||
'HTTP_SERVER_ERROR': {},
|
||||
'MIGRATE_HEADING': {},
|
||||
'MIGRATE_LABEL': {},
|
||||
'MIGRATE_SUCCESS': {},
|
||||
'MIGRATE_FAILURE': {},
|
||||
},
|
||||
DARK_PALETTE: {
|
||||
'ERROR': {'fg': 'red', 'opts': ('bold',)},
|
||||
|
@ -113,8 +111,6 @@ 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',)},
|
||||
|
@ -134,8 +130,6 @@ 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