Skip to content

Instantly share code, notes, and snippets.

View szelga's full-sized avatar

Wasil Siargiejczyk szelga

  • Russia, Chelyabinsk
View GitHub Profile
@szelga
szelga / colorize_runserver_plus.py
Created July 25, 2013 08:46
monkey patch Werkzeug to color log output according to HTTP responce code. created for using with django_extensions command runserver_plus.
from django.conf import settings
from django.core.management.color import color_style
try:
from werkzeug.serving import WSGIRequestHandler
from werkzeug._internal import _log
_style = color_style()
def werk_log(self, type, message, *args):