def formfield(self, **kwargs):
    defaults = {'min_value': self.min_value, 'max_value': self.max_value}
defaults.update(kwargs)
return super(IntegerRangeField, self).formfield(**defaults)
How to limit the maximum value of a numeric field in a Django model?