'Formats a number into a string with the requisite number of digits and
decimal places.'

def format_number(self, value):

    from django.db.backends import util
    return util.format_number(value, self.max_digits, self.decimal_places)
