**Usage:**
To use the BoundedRangeField, developers will be able to specify the
minimum and maximum values for the integer range when defining form
fields. For example:
{{{
my_field = BoundedRangeField(min_val=0, max_val=100)
}}}
This will create a form field that accepts integers between 0 and 100.
**Additional Notes:**
The proposed BoundedRangeField is designed to align with Django's form
field conventions and maintain compatibility with database-related
functionality.
Testing and documentation updates will be necessary to ensure proper
integration and usage of this new field.
Please feel free to review and provide feedback on this proposal. Once the
proposal is accepted, I will proceed with implementing the feature and
submitting a pull request.
--
Ticket URL: <https://code.djangoproject.com/ticket/34826>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: assigned => closed
* resolution: => wontfix
Comment:
H Atufa,
Thanks for your suggestion though there are a couple of important points
here:
- Django already supplies range-based widgets for postgres which can be
used with forms (I'm assuming you're talking about pg here because that's
the only database backend that has range fields):
https://docs.djangoproject.com/en/4.2/ref/contrib/postgres/forms/#range-
fields
- All new feature requests (if this is separate from above) *must* be
discussed on the Django forum where it will reach more people that can
chime in on the conversation:
https://code.djangoproject.com/wiki/DevelopersMailingList
--
Ticket URL: <https://code.djangoproject.com/ticket/34826#comment:1>