Answer the question
In order to leave comments, you need to log in
How to send the objects found in the database to the template?
Hello, there is a function like this ormka ponyorm
@db_session
def select_allvalid_users():
users = select(x for x in User)
print(type(users))
print(users)
return users
[User[1], User[2]]
usr = select_allvalid_users()
return jsonify(user = usr)
TypeError: User[1] is not JSON serializable
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question