I want to limit the field to values 0-10 in a select widget.
field=models.IntegerField(max_length=10, choices=CHOICES)
I could just write out all the choices tuples from (0,0),(1,1) on, but there must be an obvious way to handle this.
Help is highly appreciated.
Use a Python list comprehension:
This will result in: