Relative Content

Tag Archive for pythonflasksqlalchemyflask-security

How to prevent flask-security from using db_session.query_property()

I’m trying to setup flask-security using the example at https://flask-security-too.readthedocs.io/en/stable/quickstart.html. I am using SQLAlchemy, not flask-sqlalchemy. I was able to get the example to work, but I’m having problems integrating it in my application. flask-security seems to require Base.query = db_session.query_property(), which in turn, seems to require using scoped-session, which I don’t use (there seem to be some strong opinions against using it)

How to prevent flask-security from using db_session.query_property()

I’m trying to setup flask-security using the example at https://flask-security-too.readthedocs.io/en/stable/quickstart.html. I am using SQLAlchemy, not flask-sqlalchemy. I was able to get the example to work, but I’m having problems integrating it in my application. flask-security seems to require Base.query = db_session.query_property(), which in turn, seems to require using scoped-session, which I don’t use (there seem to be some strong opinions against using it)