In Flask-SQLAlchemy, at:
https://pythonhosted.org/Flask-SQLAlchemy/queries.html
you access to your session via db.session.
How do you make the session accessed via db.session have
expire_on_commit=False
I tried db.session.expire_on_commit = False but this does not appera to take affect.
You can use the session_options dictionary when making the database object.
db = SQLAlchemy(app, session_options={"expire_on_commit": False})
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With