Fixed #23812 - Replaced every range and xrange with django.utils.six.moves.range