Reputation: 168
In django model types, models.CommaSeparatedIntegerField consists of a field of integers separated by commas with a required max_length field option.
If i have max_length=30, does it mean i can store 30 integers separated by commas or it's the entire string input that must be within 30 characters?
Upvotes: 1
Views: 465
Reputation: 369
It's mean that you can entire string input that must be within 30 characters...
https://docs.djangoproject.com/en/dev/ref/models/fields/
models.CommaSeparatedIntegerField converts into varchar in db, so the max_length determines the length of this string.
Upvotes: 1