Hello,
I have model and a DB with data. I have to change one field size (lets say, from 255 to 4000). The column is called "papers".
I made a South migration, by creating by hand a migration script, and it worked, since the size for this column was changed in the DB.
Now I have the column with the size I want, but, in the admin page, I still see the field size set to 255 because that is the size of the inputtext in the form for this field.
So I overrided the field to make more room for the new data size, by using:
formfield_for_dbfield(self, db_field, **kwargs):
....
return db_field.formfield(widget=forms.Textarea(
attrs={'cols': 80, 'rows': 10},
))
So now I have a bigger form.
But when I put more than 255 chars in it, I get a JS validation error telling me that "Ensure this value has at most 255 characters (it has 2332)."
So the question is how can I change the data size for the JS to take into account the new size?
Best,
SB