I have a website running with a mysql database using the sql-alchemy package that has suddenly broken. I have done some research and found that the expected issue is that th
I was also having this issue. I got the hacks (as described above) to work, but looking at the discussions on https://github.com/wtforms/wtforms/issues/373 and https://github.com/flask-admin/flask-admin/issues/1588, it looked like support for wtforms_sqlalchemy is not as good as wtforms_alchemy.
So, I installed wtforms_alchemy
pip install wtforms_alchemy
and replaced wtforms_sqlalchemy with wtform_alchemy in my project
from wtforms_alchemy.fields import QuerySelectField
and my project worked the same.