Django Error / Value Too Long For Type Character Varying(1)
I'm trying to add new formset field to my model/forms, but when i want save it, i gets an error ' value too long for type character varying(1)'. Can anyone help me with that? I'm b
Solution 1:
You've declared study_1
to be a character field with a maximum length of 1 character, but you're setting it with four-digit strings representing years.
Solution 2:
change the max_length of study_1
to 4 or more and then make a migration of your changes by python manage.py makemigrations
. Finally apply changes by python manage.py migrate
.
Post a Comment for "Django Error / Value Too Long For Type Character Varying(1)"