Graph coloring in HTML5/javascript using django