"""
Sets up the terminal color scheme.
"""

from django.core.management import color
from django.utils import termcolors


def color_style():
    style = color.color_style()
    if color.supports_color():
        style.INFO = termcolors.make_style(fg='green')
        style.WARN = termcolors.make_style(fg='yellow')
        style.BOLD = termcolors.make_style(opts=('bold',))
        style.URL = termcolors.make_style(fg='green', opts=('bold',))
        style.MODULE = termcolors.make_style(fg='yellow')
        style.MODULE_NAME = termcolors.make_style(opts=('bold',))
        style.URL_NAME = termcolors.make_style(fg='red')
    return style

@@ -116,16 +116,61 @@
 olors%0A%0A%0A
+def _dummy_style_func(msg):%0A    return msg%0A%0A%0A
 def colo
@@ -664,16 +664,213 @@
 ='red')%0A
+    else:%0A        for role in ('INFO', 'WARN', 'BOLD', 'URL', 'MODULE', 'MODULE_NAME', 'URL_NAME'):%0A            if not hasattr(style, role):%0A                setattr(style, role, _dummy_style_func)%0A
     retu

add dummy func to style object if it does not exist (fix for django 1.8)