We are trying to create a slider for observed opacity of a sediment filter for a house. 1-10 are the possible values. How could we best accomplish/define this in a Django model. Currently we are using a similar approach with
inline_filter_clarity = models.PositiveSmallIntegerField(
validators=[MinValueValidator(0), MaxValueValidator(10)])
in models.py and would like to use this in a both a change list and a view, with some limitations:
- Limit the values as whole numbers, if possible.
- A quick way to have a technician be able to select a value- "slider" is just a criteria suggested from a non-tech team member. We will live with whatever is easiest.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…