Update from master. (1.5 django compatable)