File: color.py

package info (click to toggle)
python-django-extensions 0.4.2pre%2Bgit201004211325-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 768 kB
  • ctags: 739
  • sloc: python: 4,197; makefile: 76
file content (14 lines) | stat: -rw-r--r-- 425 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
"""
Sets up the terminal color scheme.
"""

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

def color_style():
    style = color.color_style()
    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