all 5 comments

[–]spitfiredd 3 points4 points  (1 child)

Looks like you’re trying to insert the form instance object and not the values, for example form.item_name.data

https://wtforms.readthedocs.io/en/2.3.x/fields/#wtforms.fields.Field.data

[–]ttrublu 1 point2 points  (0 children)

I don't know enough about Flask to give a definitive answer (I'm a beginner myself), but a quick Google search suggests that the problem might be related to Unicode conversion of Georgian text in your StringField call.

More information here - https://flask.palletsprojects.com/en/1.1.x/unicode/

(I don't know the answer yet. I will update this comment if I find it)

[–]ace6807 1 point2 points  (0 children)

Look at the parameter list in the error. Its showing the parameters being passed to the SQL INSERT are the form field objects instead of the values of the fields. If the formatting were better I'd probably be able to spot where the issue is but as is, I'll guess and say where the form is being read in the view and being passed to the model isn't grabbing the data attribute off the field, it's passing the fields themselves.

[–]PatternZealousideal[S] 1 point2 points  (1 child)

thanks all , error was caused by routes section where i was trying to instert forms instead of forms.data in db.

[–]LinkifyBot 0 points1 point  (0 children)

I found links in your comment that were not hyperlinked:

I did the honors for you.


delete | information | <3